aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2022-06-17 20:00:17 -0400
committerMatthew Wilcox (Oracle) <[email protected]>2022-06-20 16:37:45 -0400
commitcb995f4eeba9d268fd4b56c2423ad6c1d1ea1b82 (patch)
treebb343bdc1f83d5f0675ee98170d868a437543cca /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
parent5ccc944dce3df5fd2fd683a7df4fd49d1068eba2 (diff)
filemap: Handle sibling entries in filemap_get_read_batch()
If a read races with an invalidation followed by another read, it is possible for a folio to be replaced with a higher-order folio. If that happens, we'll see a sibling entry for the new folio in the next iteration of the loop. This manifests as a NULL pointer dereference while holding the RCU read lock. Handle this by simply returning. The next call will find the new folio and handle it correctly. The other ways of handling this rare race are more complex and it's just not worth it. Reported-by: Dave Chinner <[email protected]> Reported-by: Brian Foster <[email protected]> Debugged-by: Brian Foster <[email protected]> Tested-by: Brian Foster <[email protected]> Reviewed-by: Brian Foster <[email protected]> Fixes: cbd59c48ae2b ("mm/filemap: use head pages in generic_file_buffered_read") Cc: [email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
0 files changed, 0 insertions, 0 deletions