linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RT] rcu: mark rcu_iw_handler() as IRQ_WORK_HARD_IRQ
@ 2018-07-30 19:28 Sebastian Andrzej Siewior
  0 siblings, 0 replies; only message in thread
From: Sebastian Andrzej Siewior @ 2018-07-30 19:28 UTC (permalink / raw)
  To: linux-rt-users; +Cc: tglx, rostedt, linux-kernel, John Ogness

RCU's rcu_iw irq-work (rcu_iw_handler()) acquires the raw spinlock
rnp->lock without disabling interrupts. The lock is held normally with
disabled interrupts for a short time.
Mark irq-work as IRQ_WORK_HARD_IRQ so it is invoked in IRQ context like
on !RT.

Reported-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/rcu/tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 5a9c5abb17da..4fb983f4b9fd 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1294,6 +1294,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
 		    !rdp->rcu_iw_pending && rdp->rcu_iw_gpnum != rnp->gpnum &&
 		    (rnp->ffmask & rdp->grpmask)) {
 			init_irq_work(&rdp->rcu_iw, rcu_iw_handler);
+			rdp->rcu_iw.flags = IRQ_WORK_HARD_IRQ;
 			rdp->rcu_iw_pending = true;
 			rdp->rcu_iw_gpnum = rnp->gpnum;
 			irq_work_queue_on(&rdp->rcu_iw, rdp->cpu);
-- 
2.18.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-30 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 19:28 [PATCH RT] rcu: mark rcu_iw_handler() as IRQ_WORK_HARD_IRQ Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).