aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2023-08-22 22:14:47 -0700
committerAndrew Morton <[email protected]>2023-08-24 14:59:47 -0700
commite5548f85b4527c4c803b7eae7887c10bf8f90c97 (patch)
treee89cd6f78cdd98fedad9054d38f517249240016c /tools/perf/util
parentf84f62e69963d7742acec4340ec1c4c7ef22b887 (diff)
shmem: fix smaps BUG sleeping while atomic
smaps_pte_hole_lookup() is calling shmem_partial_swap_usage() with page table lock held: but shmem_partial_swap_usage() does cond_resched_rcu() if need_resched(): "BUG: sleeping function called from invalid context". Since shmem_partial_swap_usage() is designed to count across a range, but smaps_pte_hole_lookup() only calls it for a single page slot, just break out of the loop on the last or only page, before checking need_resched(). Link: https://lkml.kernel.org/r/[email protected] Fixes: 230100321518 ("mm/smaps: simplify shmem handling of pte holes") Signed-off-by: Hugh Dickins <[email protected]> Acked-by: Peter Xu <[email protected]> Cc: <[email protected]> [5.16+] Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/util')
0 files changed, 0 insertions, 0 deletions