The patch titled Subject: mm-kasan-add-object-validation-in-ksize-v4 has been added to the -mm tree. Its filename is mm-kasan-add-object-validation-in-ksize-v4.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-kasan-add-object-validation-in-ksize-v4.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-kasan-add-object-validation-in-ksize-v4.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Marco Elver <elver@xxxxxxxxxx> Subject: mm-kasan-add-object-validation-in-ksize-v4 s/BUG_ON/WARN_ON_ONCE/, per Kees Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199359 Link: http://lkml.kernel.org/r/20190627094445.216365-6-elver@xxxxxxxxxx Signed-off-by: Marco Elver <elver@xxxxxxxxxx> Acked-by: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/slab_common.c~mm-kasan-add-object-validation-in-ksize-v4 +++ a/mm/slab_common.c @@ -1615,7 +1615,8 @@ size_t ksize(const void *objp) { size_t size; - BUG_ON(!objp); + if (WARN_ON_ONCE(!objp)) + return 0; /* * We need to check that the pointed to object is valid, and only then * unpoison the shadow memory below. We use __kasan_check_read(), to _ Patches currently in -mm which might be from elver@xxxxxxxxxx are mm-kasan-print-frame-description-for-stack-bugs.patch lib-test_kasan-add-bitops-tests.patch x86-use-static_cpu_has-in-uaccess-region-to-avoid-instrumentation.patch asm-generic-x86-add-bitops-instrumentation-for-kasan.patch mm-kasan-introduce-__kasan_check_readwrite.patch mm-kasan-change-kasan_check_readwrite-to-return-boolean.patch lib-test_kasan-add-test-for-double-kzfree-detection.patch mm-slab-refactor-common-ksize-kasan-logic-into-slab_commonc.patch mm-kasan-add-object-validation-in-ksize.patch mm-kasan-add-object-validation-in-ksize-v4.patch