diff options
| author | Alexander Potapenko <[email protected]> | 2021-07-23 22:50:11 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-07-24 00:43:28 +0000 |
| commit | 235a85cb32bb123854ad31de46fdbf04c1d57cda (patch) | |
| tree | 20de2e4c1293425ab5f2566e1525ef70e2981e20 /lib/debugobjects.c | |
| parent | kfence: defer kfence_test_init to ensure that kunit debugfs is created (diff) | |
| download | kernel-235a85cb32bb123854ad31de46fdbf04c1d57cda.tar.gz kernel-235a85cb32bb123854ad31de46fdbf04c1d57cda.zip | |
kfence: move the size check to the beginning of __kfence_alloc()
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.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexander Potapenko <[email protected]>
Suggested-by: Marco Elver <[email protected]>
Reviewed-by: Marco Elver <[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: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
