From: Maria Matejka Date: Tue, 4 Mar 2025 12:02:01 +0000 (+0100) Subject: RCU Unwinder stores where it came from last time X-Git-Tag: v3.0.2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5d46eb68b2861d1243528d5acc671db1459165a;p=thirdparty%2Fbird.git RCU Unwinder stores where it came from last time This information is vital for stuck situations where the RCU Unwinder keeps longjumping away. --- 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)