kasan: call kasan_malloc() from __kmalloc_*track_caller()
authorPeter Collingbourne <pcc@google.com>
Wed, 14 Sep 2022 02:00:01 +0000 (19:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:11:44 +0000 (11:11 +0200)
commitbf0197aea19562be03a5c179afd51adbb2a5bf80
treeb4793a5e2016576c7cfb30f2ddcd2ccdf32b7646
parentc75288a4902b9ecd68c0f38bf792ce7ca2ece968
kasan: call kasan_malloc() from __kmalloc_*track_caller()

commit 5373b8a09d6e037ee0587cb5d9fe4cc09077deeb upstream.

We were failing to call kasan_malloc() from __kmalloc_*track_caller()
which was causing us to sometimes fail to produce KASAN error reports
for allocations made using e.g. devm_kcalloc(), as the KASAN poison was
not being initialized. Fix it.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: <stable@vger.kernel.org> # 5.15
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/slub.c