summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorNickolai Zeldovich <nickolai@csail.mit.edu>2026-10-27 15:20:14 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-11-09 22:44:27 -0800
commit9378306c5d3db7e733d60a8b85a22b2b143ecffd (patch)
tree1f52da9f5d4eeb7c70e76daacf4a5e9f81505695 /tools/perf/scripts/python/bin/stackcollapse-report
parent26601a6c80c52c5336cd02b3379710077aeafc4a (diff)
xarray: clear the new head's parent before freeing the old head
xas_shrink() passes the old head to xa_node_free(), which queues it with call_rcu(), before it clears the new head's parent pointer. A lockless walker that loads the new head after the grace period has started can still climb from it into the old head through xa_parent(), as xas_find(), xas_find_marked(), xas_next() and xas_prev() do when they step past the end of a node, and read the old head after it is freed. Clear the parent pointer before freeing the old head, as radix_tree_shrink() does. With a delay injected after xa_node_free() in xas_shrink(), KASAN reports a slab-use-after-free in the walker; with this patch it does not. Link: https://lore.kernel.org/20261027192014.844878-1-nickolai@csail.mit.edu Fixes: 58d6ea3085f2 ("xarray: Add XArray unconditional store operations") Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions