Archive-only list for syzbot
 help / color / mirror / Atom feed
From: syzbot <syzbot@syzkaller.appspotmail.com>
To: syzbot@lists.linux.dev
Cc: syzbot <syzbot+cia7ddf4f17dfab266@syzkaller.appspotmail.com>,
	 mjambigi@linux.ibm.com
Subject: Forwarded: Re: [syzbot ci] Re: net/smc: fix clcsock and lgr/lnk races in smc_diag dump path
Date: Wed, 12 Aug 2026 05:38:06 -0700	[thread overview]
Message-ID: <6a7c692e.d5f0ebe7.22d851.000c.GAE@google.com> (raw)
In-Reply-To: <df7a4fe7-d9be-4a5d-942b-5ca3c1fb1031@linux.ibm.com>

For archival purposes, forwarding an incoming command email to
syzbot@lists.linux.dev.

***

Subject: Re: [syzbot ci] Re: net/smc: fix clcsock and lgr/lnk races in smc_diag dump path
Author: mjambigi@linux.ibm.com

#syz test

v4: Move hash(sk) to the end of smc_sk_init() so the socket is published only after it is fully constructed.

diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 00403175b740..5e7560417ec7 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -409,13 +409,13 @@ void smc_sk_init(struct net *net, struct sock *sk, int protocol)
 				      "sk_lock-AF_SMC", &smc_key);
 	spin_lock_init(&smc->accept_q_lock);
 	spin_lock_init(&smc->conn.send_lock);
-	sk->sk_prot->hash(sk);
 	mutex_init(&smc->clcsock_release_lock);
 	smc_init_saved_callbacks(smc);
 	smc->limit_smc_hs = net->smc.limit_smc_hs;
 	smc->use_fallback = false; /* assume rdma capability first */
 	smc->fallback_rsn = 0;
 	smc_close_init(smc);
+	sk->sk_prot->hash(sk);
 }

 static struct sock *smc_sock_alloc(struct net *net, struct socket *sock,

       reply	other threads:[~2026-08-12 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <df7a4fe7-d9be-4a5d-942b-5ca3c1fb1031@linux.ibm.com>
2026-08-12 12:38 ` syzbot [this message]
2026-08-12 13:22   ` [syzbot ci] Re: net/smc: fix clcsock and lgr/lnk races in smc_diag dump path syzbot ci
     [not found] <3fed64ca-e62e-448f-ba4c-7cd1f0543899@linux.ibm.com>
2026-08-12 12:32 ` Forwarded: " syzbot
2026-08-12 12:34   ` syzbot ci
     [not found] <81003c25-0d13-4fe7-b7b2-2c676f043899@linux.ibm.com>
2026-08-12  6:35 ` syzbot
2026-08-12  6:36   ` syzbot ci

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=6a7c692e.d5f0ebe7.22d851.000c.GAE@google.com \
    --to=syzbot@syzkaller.appspotmail.com \
    --cc=mjambigi@linux.ibm.com \
    --cc=syzbot+cia7ddf4f17dfab266@syzkaller.appspotmail.com \
    --cc=syzbot@lists.linux.dev \
    /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