aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2021-07-27 13:12:20 -1000
committerTejun Heo <[email protected]>2021-07-27 13:12:20 -1000
commitc3df5fb57fe8756d67fd56ed29da65cdfde839f9 (patch)
tree58e8de70658fb85ae8e451194bd9aa742618acec /tools/perf/scripts/python/Perf-Trace-Util
parent1e7107c5ef44431bc1ebbd4c353f1d7c22e5f2ec (diff)
cgroup: rstat: fix A-A deadlock on 32bit around u64_stats_sync
0fa294fb1985 ("cgroup: Replace cgroup_rstat_mutex with a spinlock") added cgroup_rstat_flush_irqsafe() allowing flushing to happen from the irq context. However, rstat paths use u64_stats_sync to synchronize access to 64bit stat counters on 32bit machines. u64_stats_sync is implemented using seq_lock and trying to read from an irq context can lead to A-A deadlock if the irq happens to interrupt the stat update. Fix it by using the irqsafe variants - u64_stats_update_begin_irqsave() and u64_stats_update_end_irqrestore() - in the update paths. Note that none of this matters on 64bit machines. All these are just for 32bit SMP setups. Note that the interface was introduced way back, its first and currently only use was recently added by 2d146aa3aa84 ("mm: memcontrol: switch to rstat"). Stable tagging targets this commit. Signed-off-by: Tejun Heo <[email protected]> Reported-by: Rik van Riel <[email protected]> Fixes: 2d146aa3aa84 ("mm: memcontrol: switch to rstat") Cc: [email protected] # v5.13+
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util')
0 files changed, 0 insertions, 0 deletions