From: "D. Wythe" <alibuda@linux.alibaba.com>
To: Daniel Yang <danielyangkang@gmail.com>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Jan Karcher <jaka@linux.ibm.com>,
Tony Lu <tonylu@linux.alibaba.com>,
Wen Gu <guwen@linux.alibaba.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Subject: Re: [PATCH v3 2/2 RESEND] resolve gtp possible deadlock warning
Date: Tue, 22 Oct 2024 10:00:09 +0800 [thread overview]
Message-ID: <17c1f52d-e032-44c1-8f56-34d5cd8e30ac@linux.alibaba.com> (raw)
In-Reply-To: <c2ac8e30806af319eb96f67103196b7cda22d562.1729031472.git.danielyangkang@gmail.com>
On 10/16/24 6:48 AM, Daniel Yang wrote:
> From: Daniel Yang <danielyangkang@gmail.com>
>
> Moved lockdep annotation to separate function for readability.
>
> Signed-off-by: Daniel Yang <danielyangkang@gmail.com>
> Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
>
> ---
> net/smc/smc_inet.c | 28 +++++++++++++++-------------
> 1 file changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/net/smc/smc_inet.c b/net/smc/smc_inet.c
> index 7ae49ffd2..b3eedc3b0 100644
> --- a/net/smc/smc_inet.c
> +++ b/net/smc/smc_inet.c
> @@ -111,18 +111,7 @@ static struct inet_protosw smc_inet6_protosw = {
> static struct lock_class_key smc_slock_keys[2];
> static struct lock_class_key smc_keys[2];
>
> -static int smc_inet_init_sock(struct sock *sk)
> -{
> - struct net *net = sock_net(sk);
> - int rc;
> -
> - /* init common smc sock */
> - smc_sk_init(net, sk, IPPROTO_SMC);
> - /* create clcsock */
> - rc = smc_create_clcsk(net, sk, sk->sk_family);
> - if (rc)
> - return rc;
> -
> +static inline void smc_inet_lockdep_annotate(struct sock *sk) {
> switch (sk->sk_family) {
> case AF_INET:
> sock_lock_init_class_and_name(sk, "slock-AF_INET-SMC",
> @@ -139,8 +128,21 @@ static int smc_inet_init_sock(struct sock *sk)
> default:
> WARN_ON_ONCE(1);
> }
> +}
>
> - return 0;
> +static int smc_inet_init_sock(struct sock *sk)
> +{
> + struct net *net = sock_net(sk);
> + int rc;
> +
> + /* init common smc sock */
> + smc_sk_init(net, sk, IPPROTO_SMC);
> + /* create clcsock */
> + rc = smc_create_clcsk(net, sk, sk->sk_family);
> + if (!rc)
> + smc_inet_lockdep_annotate(sk);
> +
> + return rc;
> }
>
> int __init smc_inet_init(void)
I need to check why you said Wang Cong's patch cannot fix the issue.
As soon as I reach a conclusion, I'll inform you right away.
D. Wythe
next prev parent reply other threads:[~2024-10-22 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 22:48 Daniel Yang
2024-10-15 22:48 ` [PATCH v3 1/2 RESEND] resolve gtp possible deadlock warning Daniel Yang
2024-10-15 22:48 ` [PATCH v3 2/2 " Daniel Yang
2024-10-16 0:03 ` Kuniyuki Iwashima
2024-10-16 0:24 ` Daniel Yang
2024-10-16 0:30 ` Daniel Yang
2024-10-22 2:00 ` D. Wythe [this message]
2024-10-16 1:27 ` Jakub Kicinski
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=17c1f52d-e032-44c1-8f56-34d5cd8e30ac@linux.alibaba.com \
--to=alibuda@linux.alibaba.com \
--cc=danielyangkang@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.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