netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Edward Adam Davis <eadavis@qq.com>
Cc: allison.henderson@oracle.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	rds-devel@oss.oracle.com, santosh.shilimkar@oracle.com,
	syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down
Date: Tue, 5 Mar 2024 12:20:45 +0000	[thread overview]
Message-ID: <20240305122045.GB2357@kernel.org> (raw)
In-Reply-To: <tencent_A0E364097003A96459B76B577166D5F36505@qq.com>

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@syzkaller.appspotmail.com
> > > Signed-off-by: Edward Adam Davis <eadavis@qq.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.

  reply	other threads:[~2024-03-05 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 20:53 [syzbot] [rds?] WARNING in rds_conn_connect_if_down syzbot
2024-02-27 14:58 ` syzbot
2024-02-27 22:41   ` Allison Henderson
2024-03-03  3:57   ` [PATCH] net/rds: fix " Edward Adam Davis
2024-03-03  4:18   ` Edward Adam Davis
2024-03-04 17:07     ` Simon Horman
2024-03-05  0:12       ` Edward Adam Davis
2024-03-05 12:20         ` Simon Horman [this message]
2024-03-05  0:13       ` [PATCH V2] " Edward Adam Davis
2024-03-06 12:00         ` patchwork-bot+netdevbpf

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=20240305122045.GB2357@kernel.org \
    --to=horms@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=davem@davemloft.net \
    --cc=eadavis@qq.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=santosh.shilimkar@oracle.com \
    --cc=syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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;
as well as URLs for NNTP newsgroup(s).