From: syzbot <syzbot+51cf7cc5f9ffc1006ef2@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Re: [syzbot] [net?] possible deadlock in rtnl_lock (8)
Date: Wed, 11 Sep 2024 02:48:00 -0700 [thread overview]
Message-ID: <000000000000acfb4e0621d4e20a@google.com> (raw)
In-Reply-To: <0000000000000311430620013217@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] [net?] possible deadlock in rtnl_lock (8)
Author: alibuda@linux.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
next prev parent reply other threads:[~2024-09-11 9:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 3:49 [syzbot] [net?] possible deadlock in rtnl_lock (8) syzbot
2024-09-08 8:12 ` syzbot
2024-09-09 8:02 ` Eric Dumazet
2024-09-09 11:44 ` Wenjia Zhang
2024-09-10 5:55 ` D. Wythe
2024-09-10 6:36 ` Eric Dumazet
2024-09-10 6:58 ` D. Wythe
2024-09-11 8:52 ` [syzbot] " syzbot
2024-09-11 9:42 ` syzbot
2024-09-11 9:48 ` syzbot [this message]
2024-09-11 10:15 ` syzbot
2024-09-11 10:22 ` syzbot
2024-09-11 11:33 ` syzbot
2024-09-11 12:27 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=000000000000acfb4e0621d4e20a@google.com \
--to=syzbot+51cf7cc5f9ffc1006ef2@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox