summaryrefslogtreecommitdiff
path: root/mm/percpu-vm.c
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2021-07-24 01:50:11 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-24 03:43:28 +0300
commit235a85cb32bb123854ad31de46fdbf04c1d57cda (patch)
tree20de2e4c1293425ab5f2566e1525ef70e2981e20 /mm/percpu-vm.c
parent32ae8a0669392248a92d7545a7363004543f3932 (diff)
downloadlinux-235a85cb32bb123854ad31de46fdbf04c1d57cda.tar.xz
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/20210714092222.1890268-1-glider@google.com Signed-off-by: Alexander Potapenko <glider@google.com> Suggested-by: Marco Elver <elver@google.com> Reviewed-by: Marco Elver <elver@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Marco Elver <elver@google.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: <stable@vger.kernel.org> [5.12+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/percpu-vm.c')
0 files changed, 0 insertions, 0 deletions