From b5d46eb68b2861d1243528d5acc671db1459165a Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Tue, 4 Mar 2025 13:02:01 +0100 Subject: [PATCH] RCU Unwinder stores where it came from last time This information is vital for stuck situations where the RCU Unwinder keeps longjumping away. --- lib/locking.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/locking.h b/lib/locking.h index 60928ecc0..8f30e67da 100644 --- a/lib/locking.h +++ b/lib/locking.h @@ -493,6 +493,8 @@ static inline void locking_unwind(struct lock_order *desired) struct rcu_unwinder { struct lock_order locking_stack; + const char *file; + u32 line; u32 retry; u8 fast; jmp_buf buf; @@ -522,7 +524,7 @@ static inline void _rcu_unwinder_unlock_(struct rcu_unwinder *o UNUSED) _i->locking_stack = locking_stack; \ rcu_read_lock(); \ -#define RCU_RETRY(_i) do { if (_i) longjmp(_i->buf, 1); else bug("No rcu retry allowed here"); } while (0) +#define RCU_RETRY(_i) do { if (_i) { _i->file = __FILE__; _i->line = __LINE__; longjmp(_i->buf, 1); } else bug("No rcu retry allowed here"); } while (0) #define RCU_RETRY_FAST(_i) do { (_i)->fast++; RCU_RETRY(_i); } while (0) -- 2.47.3