diff options
author | Alexander Potapenko <[email protected]> | 2019-10-14 14:11:57 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-10-14 15:04:01 -0700 |
commit | 0f181f9fbea8bc7ea2f7e13ae7f8c256b39e254c (patch) | |
tree | a6d1d1a674b791224d2430bae6d2fa69f10037b0 /scripts/gcc-plugins | |
parent | 3c52b0af059e11a063970aed1ad143b9284a79c7 (diff) |
mm/slub.c: init_on_free=1 should wipe freelist ptr for bulk allocations
slab_alloc_node() already zeroed out the freelist pointer if
init_on_free was on. Thibaut Sautereau noticed that the same needs to
be done for kmem_cache_alloc_bulk(), which performs the allocations
separately.
kmem_cache_alloc_bulk() is currently used in two places in the kernel,
so this change is unlikely to have a major performance impact.
SLAB doesn't require a similar change, as auto-initialization makes the
allocator store the freelist pointers off-slab.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Signed-off-by: Alexander Potapenko <[email protected]>
Reported-by: Thibaut Sautereau <[email protected]>
Reported-by: Kees Cook <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Laura Abbott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions