Urgent RCU pull request for v6.4
This commit fixes a spinlock-initialization regression in SRCU that causes the SRCU notifier to fail. The fix simply adds the initialization, but introduces a #ifdef because there is no spinlock to initialize for the Tiny SRCU used in !SMP builds. Yes, it would be nice to abstract this somehow in order to hide it in SRCU, but I still don't see a good way of doing this. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEbK7UrM+RBIrCoViJnr8S83LZ+4wFAmSHgb8THHBhdWxtY2tA a2VybmVsLm9yZwAKCRCevxLzctn7jLAlD/0WZonjMJ9HY3/Y6nRfzEiS7Mb4NYvK uIyti4AghHBlMfplDepquEIEybWf8BP4vkFOmFEipuuTmXtCCyWQ4Lbq2txr0aa8 BjlE8/lacs8hWgP2GydjlvjgUhXVzaHNCy+4yaePJHYoLQ8zZ94DpVR91993mUYL PUyyk2J7E1H5C8lKaBxUOH7K5znWLszpkQuF3CjruGZ5VE0QkI1qQVP26WMZt29r Zc9qmcHD5Zzxch3NaQjFIkOwTtL21y9S/tIUZ7jQ1IOcGrvjvS2Rq+SFVCGNKp97 erFboEhc+1n31AI/cGdLElaWEICgkcgg6/6XsH36QLSLFyQMzSyskEexCvQoeuU6 /OUX0/q4eCfhEx9sCf43PvW0j23DTpO+woM0STd3a19ta+8b8IYzqtzdkl+mxbYG rjVITl9iz2zp+Cq7qI8JZAmphndqiX9grt8mkcyWwAB7mKlpU8ZzxNSygtz3N3Yq HvZGTB4KO+xrJERDPj332dNNADwmPGiVy0Hu4DhjbT+v931TZB+PY6k9jkI+Qlgu CNsVNyr4UbBcnuGutcTGtyGcEGqgJ+26+8LbUbBxINJvtBfCby5sltBLZb3jVfw+ 27mF0qCPP2f0ZUliDDjnRBAAc2/ntlNqJ3DykwXZ/XffJQmErtT1nehBzzMVOAbv HNo5R81/3cLkbw== =TwoV -----END PGP SIGNATURE----- Merge tag 'urgent-rcu.2023.06.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This fixes a spinlock-initialization regression in SRCU that causes the SRCU notifier to fail. The fix simply adds the initialization, but introduces a #ifdef because there is no spinlock to initialize for the Tiny SRCU used in !SMP builds. Yes, it would be nice to abstract this somehow in order to hide it in SRCU, but I still don't see a good way of doing this" * tag 'urgent-rcu.2023.06.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: notifier: Initialize new struct srcu_usage field
This commit is contained in:
commit
b73056e9f8
|
@ -106,12 +106,22 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
|
|||
#define RAW_NOTIFIER_INIT(name) { \
|
||||
.head = NULL }
|
||||
|
||||
#ifdef CONFIG_TREE_SRCU
|
||||
#define SRCU_NOTIFIER_INIT(name, pcpu) \
|
||||
{ \
|
||||
.mutex = __MUTEX_INITIALIZER(name.mutex), \
|
||||
.head = NULL, \
|
||||
.srcuu = __SRCU_USAGE_INIT(name.srcuu), \
|
||||
.srcu = __SRCU_STRUCT_INIT(name.srcu, name.srcuu, pcpu), \
|
||||
}
|
||||
#else
|
||||
#define SRCU_NOTIFIER_INIT(name, pcpu) \
|
||||
{ \
|
||||
.mutex = __MUTEX_INITIALIZER(name.mutex), \
|
||||
.head = NULL, \
|
||||
.srcu = __SRCU_STRUCT_INIT(name.srcu, name.srcuu, pcpu), \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ATOMIC_NOTIFIER_HEAD(name) \
|
||||
struct atomic_notifier_head name = \
|
||||
|
|
Loading…
Reference in New Issue