aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2017-06-29 23:33:38 +0200
committerThomas Gleixner <[email protected]>2017-07-04 12:46:16 +0200
commit46e48e257360f0845fe17089713cbad4db611e70 (patch)
treebd2a904fb949d135cf8bd09964fe734a1d9138e1 /tools/perf/util/trace-event-scripting.c
parent9114014cf4e6df0b22d764380ae1fc54f1a7a8b2 (diff)
genirq: Move irq resource handling out of spinlocked region
Aside of being conceptually wrong, there is also an actual (hard to trigger and mostly theoretical) problem. CPU0 CPU1 free_irq(X) interrupt X spin_lock(desc->lock) wake irq thread() spin_unlock(desc->lock) spin_lock(desc->lock) remove action() shutdown_irq() release_resources() thread_handler() spin_unlock(desc->lock) access released resources. synchronize_irq() Move the release resources invocation after synchronize_irq() so it's guaranteed that the threaded handler has finished. Move the resource request call out of the desc->lock held region as well, so the invocation context is the same for both request and release. This solves the problems with those functions on RT as well. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Julia Cartwright <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Brian Norris <[email protected]> Cc: Doug Anderson <[email protected]> Cc: [email protected] Cc: John Keeping <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions