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: <20240305122045.GB2357@kernel.org>
Date: Tue, 5 Mar 2024 12:20:45 +0000
From: Simon Horman <horms@...nel.org>
To: Edward Adam Davis <eadavis@...com>
Cc: allison.henderson@...cle.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, linux-kernel@...r.kernel.org,
	linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
	pabeni@...hat.com, rds-devel@....oracle.com,
	santosh.shilimkar@...cle.com,
	syzbot+d4faee732755bba9838e@...kaller.appspotmail.com,
	syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down

On Tue, Mar 05, 2024 at 08:12:03AM +0800, Edward Adam Davis wrote:
> On Mon, 4 Mar 2024 17:07:07 +0000, Simon Horman wrote:
> > > If connection isn't established yet, get_mr() will fail, trigger connection after
> > > get_mr().
> > > 
> > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") 
> > > Reported-and-tested-by: syzbot+d4faee732755bba9838e@...kaller.appspotmail.com
> > > Signed-off-by: Edward Adam Davis <eadavis@...com>
> > > ---
> > >  net/rds/rdma.c | 3 +++
> > >  net/rds/send.c | 6 +-----
> > >  2 files changed, 4 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/net/rds/rdma.c b/net/rds/rdma.c
> > > index fba82d36593a..a4e3c5de998b 100644
> > > --- a/net/rds/rdma.c
> > > +++ b/net/rds/rdma.c
> > > @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
> > >  			kfree(sg);
> > >  		}
> > >  		ret = PTR_ERR(trans_private);
> > > +		/* Trigger connection so that its ready for the next retry */
> > > +		if (ret == -ENODEV)
> > > +			rds_conn_connect_if_down(cp->cp_conn);
> > 
> > Hi Edward,
> > 
> > Elsewhere in this function it is assumed that cp may be NULL.
> > Does that need to be taken into account here too?
> Don't worry about this, if it is NULL, the get_mr() return value will not be -ENODEV.

Thanks, understood.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ