[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000525c950621d544a1@google.com>
Date: Wed, 11 Sep 2024 03:15:18 -0700
From: syzbot <syzbot+51cf7cc5f9ffc1006ef2@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] Re: [syzbot] [net?] possible deadlock in rtnl_lock (8)
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: Re: [syzbot] [net?] possible deadlock in rtnl_lock (8)
Author: alibuda@...ux.alibaba.com
#syz test
Make Lockdep happy with IPPROTO_SMC
---
net/smc/smc_inet.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/net/smc/smc_inet.c b/net/smc/smc_inet.c
index bece346..281f0450 100644
--- a/net/smc/smc_inet.c
+++ b/net/smc/smc_inet.c
@@ -102,14 +102,29 @@
};
#endif /* CONFIG_IPV6 */
+static struct lock_class_key smc_clcsk_slock_keys[2];
+static struct lock_class_key smc_clcsk_keys[2];
+
static int smc_inet_init_sock(struct sock *sk)
{
+ bool is_ipv6 = sk->sk_family == AF_INET6;
struct net *net = sock_net(sk);
+ int rc;
/* init common smc sock */
smc_sk_init(net, sk, IPPROTO_SMC);
/* create clcsock */
- return smc_create_clcsk(net, sk, sk->sk_family);
+ rc = smc_create_clcsk(net, sk, sk->sk_family);
+ if (rc)
+ return rc;
+
+ sock_lock_init_class_and_name(smc_sk(sk)->clcsk,
+ is_ipv6 ? "slock-AF_INET6-SMC-CLCSK" : "slock-AF_INET-SMC-CLCSK",
+ &smc_clcsk_slock_keys[is_ipv6],
+ is_ipv6 ? "sk_lock-AF_INET6-SMC-CLCSK" : "sk_lock-AF_INET-SMC-CLCSK",
+ &smc_clcsk_keys[is_ipv6]);
+
+ return 0;
}
int __init smc_inet_init(void)
--
1.8.3.1
Powered by blists - more mailing lists