Message ID | 20211120004346.6GSSdDImN%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/15] mm/swap.c:put_pages_list(): reinitialise the page list | expand |
--- a/lib/test_kasan.c~kasan-test-silence-intentional-read-overflow-warnings +++ a/lib/test_kasan.c @@ -869,6 +869,7 @@ static void kasan_memchr(struct kunit *t ptr = kmalloc(size, GFP_KERNEL | __GFP_ZERO); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr); + OPTIMIZER_HIDE_VAR(size); KUNIT_EXPECT_KASAN_FAIL(test, kasan_ptr_result = memchr(ptr, '1', size + 1)); @@ -894,6 +895,7 @@ static void kasan_memcmp(struct kunit *t KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr); memset(arr, 0, sizeof(arr)); + OPTIMIZER_HIDE_VAR(size); KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = memcmp(ptr, arr, size+1)); kfree(ptr);