mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] rcu: Unlock correctly in rcu_dump_cpu_stacks()
@ 2024-10-25  7:06 Dan Carpenter
  2024-10-25 22:55 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2024-10-25  7:06 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Frederic Weisbecker, Neeraj Upadhyay, Joel Fernandes,
	Josh Triplett, Boqun Feng, Uladzislau Rezki, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Zqiang, rcu, linux-kernel,
	kernel-janitors

The unlock needs to be outside the } close curly braces for this if
statement.  Otherwise it leads to a deadlock.

Fixes: 744e87210b1a ("rcu: Finer-grained grace-period-end checks in rcu_dump_cpu_stacks()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 kernel/rcu/tree_stall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index 8994391b95c7..925fcdad5dea 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -357,8 +357,8 @@ static void rcu_dump_cpu_stacks(unsigned long gp_seq)
 					pr_err("Offline CPU %d blocking current GP.\n", cpu);
 				else
 					dump_cpu_task(cpu);
-			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
 			}
+			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
 		}
 		printk_deferred_exit();
 	}
-- 
2.45.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-25 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-25  7:06 [PATCH next] rcu: Unlock correctly in rcu_dump_cpu_stacks() Dan Carpenter
2024-10-25 22:55 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®