lib: test_rhashtable: Fix KASAN warning
authorPhil Sutter <phil@nwl.cc>
Tue, 25 Jul 2017 11:36:21 +0000 (13:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jul 2017 19:35:23 +0000 (12:35 -0700)
I forgot one spot when introducing struct test_obj_val.

Fixes: e859afe1ee0c5 ("lib: test_rhashtable: fix for large entry counts")
Reported by: kernel test robot <fengguang.wu@intel.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_rhashtable.c

index 16949d219291aad189b0b8a73926f0e908e14960..0ffca990a83370d13553266be315f9373d6995da 100644 (file)
@@ -223,7 +223,9 @@ static s64 __init test_rhashtable(struct rhashtable *ht)
 
        pr_info("  Deleting %d keys\n", entries);
        for (i = 0; i < entries; i++) {
-               u32 key = i * 2;
+               struct test_obj_val key = {
+                       .id = i * 2,
+               };
 
                if (array[i].value.id != TEST_INSERT_FAIL) {
                        obj = rhashtable_lookup_fast(ht, &key, test_rht_params);