arm64: Fixes RCU deadlock due to a mistaken
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest4 patches 7 repliesIn review
Changes in v3 from the cover letter
drop handle_arch_nmi interface
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | arm64: entry: judge nmi ealier to avoid deadlock in RCUarch/ arch/ arch/ | +28 | 3 replies | |
| 2/4 | arm64: entry: distinguish pNMI earlier in el0 interruptarch/ | +27 | 0 replies | |
| 3/4 | irqchip: GICv3: expose pNMI discriminatordrivers/ | +12 | 4 replies | |
| 4/4 | arm64: entry: remove pNMI judgement in __el1_interrupt() patharch/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCHv3 0/4] arm64: Fixes RCU deadlock due to a mistaken
It was [PATCHv2 1/5] arm64/entry-common: push the judgement of nmi ahead [1], but as discussion, I found it hit a deadlock, so change subject in v3.
Linux kernel places strict semantics between NMI and maskable interrupt. So does the RCU component, else deadlock may happen.
The current arm64 entry code can partially breach this rule through calling rcu_nmi_enter() in pNMI conext without calling __nmi_enter(). Finally, it calls __rcu_irq_enter_check_tick() trying to hold raw_spin_lock_rcu_node(rdp->mynode), but this spinlock can already been held by a task running note_gp_changes()->raw_spin_trylock_rcu_node(rnp). Then deadlock happens.
The organization of this series:
[1/4] aims to fix this bug
[2-3/4] ease the implementation of [1/4]
[4/4] is a cleanup
To do:
Does arm need to handle pNMI as arm64?
v2 -> v3:
drop handle_arch_nmi interface
[1]: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Cc: Mark Rutland <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Joey Gouly <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: Julien Thierry <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Yuichi Ito <[email protected]>
Cc: [email protected]
To: [email protected]
Pingfan Liu (4):
arm64: entry: judge nmi ealier to avoid deadlock in RCU
arm64: entry: distinguish pNMI earlier in el0 interrupt
irqchip: GICv3: expose pNMI discriminator
arm64: entry: remove pNMI judgement in __el1_interrupt() path
arch/arm64/kernel/entry-common.c | 55 +++++++++++++++++++++----------- arch/arm64/kernel/irq.c | 15 +++++++++ drivers/irqchip/irq-gic-v3.c | 16 ++++++---- 3 files changed, 62 insertions(+), 24 deletions(-)
Signature · 1 line
2.31.1