lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34980e572e114106be0880ada026e53d45660233.camel@oracle.com>
Date: Mon, 21 Apr 2025 15:16:14 +0000
From: Allison Henderson <allison.henderson@...cle.com>
To: "horms@...nel.org" <horms@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 7/8] net/rds: rds_tcp_conn_path_shutdown must not
 discard messages

On Thu, 2025-04-17 at 10:47 +0100, Simon Horman wrote:
> On Fri, Apr 11, 2025 at 11:02:06AM -0700, allison.henderson@...cle.com wrote:
> 
> ...
> 
> > diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
> > index 30146204dc6c..a9596440a456 100644
> > --- a/net/rds/tcp_listen.c
> > +++ b/net/rds/tcp_listen.c
> > @@ -299,6 +299,20 @@ int rds_tcp_accept_one(struct rds_tcp_net *rtn)
> >  		rds_tcp_set_callbacks(new_sock, cp);
> >  		rds_connect_path_complete(cp, RDS_CONN_CONNECTING);
> >  	}
> > +
> > +	/* Since "rds_tcp_set_callbacks" happens this late
> > +	 * the connection may already have been closed without
> > +	 * "rds_tcp_state_change" doing its due dilligence.
> 
> nit: diligence
> 
> checkpatch.pl --codespell is your friend :)

Got it, will update.  Thanks for the catch.  :-)

Allison
> 
> > +	 *
> > +	 * If that's the case, we simply drop the path,
> > +	 * knowing that "rds_tcp_conn_path_shutdown" will
> > +	 * dequeue pending messages.
> > +	 */
> > +	if (new_sock->sk->sk_state == TCP_CLOSE_WAIT ||
> > +	    new_sock->sk->sk_state == TCP_LAST_ACK ||
> > +	    new_sock->sk->sk_state == TCP_CLOSE)
> > +		rds_conn_path_drop(cp, 0);
> > +
> >  	new_sock = NULL;
> >  	ret = 0;
> >  	if (conn->c_npaths == 0)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ