kfence, slab: fix cache_alloc_debugcheck_after() for bulk allocations 55/281555/1
authorMarco Elver <elver@google.com>
Thu, 4 Mar 2021 20:52:56 +0000 (21:52 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 20 Sep 2022 02:46:30 +0000 (11:46 +0900)
commit267fedaf4d03a7f4582f8945dcc45be3eea99dd6
tree975b19a6d80532027558ea61d2eb528e322858a0
parent5c40c2e95c37f73be6d4f9cebe2afaf7610ece60
kfence, slab: fix cache_alloc_debugcheck_after() for bulk allocations

cache_alloc_debugcheck_after() performs checks on an object, including
adjusting the returned pointer. None of this should apply to KFENCE
objects. While for non-bulk allocations, the checks are skipped when we
allocate via KFENCE, for bulk allocations cache_alloc_debugcheck_after()
is called via cache_alloc_debugcheck_after_bulk().

Fix it by skipping cache_alloc_debugcheck_after() for KFENCE objects.

Signed-off-by: Marco Elver <elver@google.com>
[port kfence feature to rpi-5.10.95]
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I07e1131fb1659455be3ac7e65147e627de63520a
mm/slab.c