Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FROMLIST: kfence: move the size check to the beginning of __kfence_al…
…loc() Check the allocation size before toggling kfence_allocation_gate. This way allocations that can't be served by KFENCE will not result in waiting for another CONFIG_KFENCE_SAMPLE_INTERVAL without allocating anything. Suggested-by: Marco Elver <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Marco Elver <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] # 5.12+ Signed-off-by: Alexander Potapenko <[email protected]> Reviewed-by: Marco Elver <[email protected]> Bug: 192294212 Test: ran KFENCE test suite with __GFP_DMA on QEMU Link: https://lore.kernel.org/linux-mm/[email protected]/ Change-Id: Ie69c6134fc1c3e68238457b146e26355c17f5295 Signed-off-by: Alexander Potapenko <[email protected]>
- Loading branch information