Netdev List
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Hidayath Khan <hidayath@linux.ibm.com>
Cc: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com,
	sidraya@linux.ibm.com, mjambigi@linux.ibm.com,
	andrew+netdev@lunn.ch, tonylu@linux.alibaba.com,
	guwen@linux.alibaba.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, pasic@linux.ibm.com,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH net v3] net/smc: fix abort_work termination in smc_conn_free()
Date: Wed, 14 Oct 2026 23:41:23 +0200	[thread overview]
Message-ID: <20261014214123.qNDtgrhJ@linutronix.de> (raw)
In-Reply-To: <20261006073550.1595003-1-hidayath@linux.ibm.com>

On 2026-10-06 09:35:50 [+0200], Hidayath Khan wrote:
> --- a/net/smc/smc_core.c
> +++ b/net/smc/smc_core.c
> @@ -1251,9 +1251,13 @@ static void smc_buf_unuse(struct smc_connection *conn,
>  	}
>  }
>  
> -/* remove a finished connection from its link group */
> +/* remove a finished connection from its link group.
> + * Must be called with the socket lock held: conn->freed is what disarms
> + * a pending or running abort_work, and both are set and tested under it.
> + */

If so, sock_owned_by_me(conn->sk) would verify it at runtime, right?

>  void smc_conn_free(struct smc_connection *conn)
>  {
> +	struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
>  	struct smc_link_group *lgr = conn->lgr;
>  
>  	if (!lgr || conn->freed)

This change looks reasonable. sashiko complains that smc_conn_create()
will reset conn->freed. Does this make sense to you?
I *think* the connection is cleaned up and it shouldn't happen but then
I just started looking at this a while ago.

Sebastian

      parent reply	other threads:[~2026-10-14 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  7:35 [PATCH net v3] net/smc: fix abort_work termination in smc_conn_free() Hidayath Khan
2026-10-06  7:39 ` netdev-bot+sinfo
2026-10-08 19:38 ` netdev-bot+sashiko
2026-10-14 21:41 ` Sebastian Andrzej Siewior [this message]

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=20261014214123.qNDtgrhJ@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=alibuda@linux.alibaba.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=hidayath@linux.ibm.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjambigi@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=sidraya@linux.ibm.com \
    --cc=tonylu@linux.alibaba.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