aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/multiorder.c
diff options
context:
space:
mode:
authorJohannes Weiner <[email protected]>2016-12-13 00:43:35 +0000
committerLinus Torvalds <[email protected]>2016-12-13 02:55:08 +0000
commit59749e6ce53735d8b696763742225f126e94603f (patch)
treef3278be9522e56ca1d7ce9abfa08ee4896c3e727 /tools/testing/radix-tree/multiorder.c
parentmm: khugepaged: close use-after-free race during shmem collapsing (diff)
downloadkernel-59749e6ce53735d8b696763742225f126e94603f.tar.gz
kernel-59749e6ce53735d8b696763742225f126e94603f.zip
mm: khugepaged: fix radix tree node leak in shmem collapse error path
The radix tree counts valid entries in each tree node. Entries stored in the tree cannot be removed by simpling storing NULL in the slot or the internal counters will be off and the node never gets freed again. When collapsing a shmem page fails, restore the holes that were filled with radix_tree_insert() with a proper radix tree deletion. Fixes: f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Reported-by: Jan Kara <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/multiorder.c')
0 files changed, 0 insertions, 0 deletions