hulk inclusion category: bugfix bugzilla: NA CVE: NA
---------------------------
If config DEBUG_SPINLOCK or DEBUG_LOCK_ALLOC is enabled, don't need fix the kabi broken.
It's introduced by 93c5c1d15abcd ("af_unix: fix races in sk_peer_pid and sk_peer_cred accesses").
Signed-off-by: Yang Yingliang yangyingliang@huawei.com Reviewed-by: Cheng Jian cj.chengjian@huawei.com Reviewed-by: Yue Haibing yuehaibing@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- include/net/sock.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h index b90b92882b3b8..803464e66e02c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -472,7 +472,9 @@ struct sock { u32 sk_ack_backlog; u32 sk_max_ack_backlog; kuid_t sk_uid; +#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_DEBUG_LOCK_ALLOC) spinlock_t sk_peer_lock; +#endif struct pid *sk_peer_pid; const struct cred *sk_peer_cred;
@@ -513,7 +515,18 @@ struct sock { struct sock_reuseport __rcu *sk_reuseport_cb; struct rcu_head sk_rcu;
+#if !defined(CONFIG_DEBUG_SPINLOCK) && !defined(CONFIG_DEBUG_LOCK_ALLOC) +#ifndef __GENKSYMS__ + union { + spinlock_t sk_peer_lock; + unsigned long kabi_reserve1; + }; +#else KABI_RESERVE(1) +#endif +#else + KABI_RESERVE(1) +#endif KABI_RESERVE(2) KABI_RESERVE(3) KABI_RESERVE(4)