public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Bernard Metzler <bmt@zurich.ibm.com>,
	Leon Romanovsky <leon@kernel.org>,
	Ursula Braun <ubraun@linux.ibm.com>,
	OFED mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH] RDMA: don't ignore client->add() failures
Date: Tue, 28 Mar 2023 08:34:41 -0300	[thread overview]
Message-ID: <ZCLQ0XVSKVHV1MB2@ziepe.ca> (raw)
In-Reply-To: <a9960371-ef94-de6e-466f-0922a5e3acf3@I-love.SAKURA.ne.jp>

On Tue, Mar 28, 2023 at 08:33:21PM +0900, Tetsuo Handa wrote:
> On 2023/03/28 20:24, Jason Gunthorpe wrote:
> > On Tue, Mar 28, 2023 at 07:52:32PM +0900, Tetsuo Handa wrote:
> >> syzbot is reporting refcount leak when client->add() from
> >> add_client_context() fails, for commit 11a0ae4c4bff ("RDMA: Allow
> >> ib_client's to fail when add() is called") for unknown reason ignores
> >> error from client->add(). We need to return an error in order to indicate
> >> that client could not be added, otherwise the caller will get confused.
> >>
> >> Reported-by: syzbot <syzbot+5e70d01ee8985ae62a3b@syzkaller.appspotmail.com>
> >> Link: https://syzkaller.appspot.com/bug?extid=5e70d01ee8985ae62a3b
> >> Fixes: 11a0ae4c4bff ("RDMA: Allow ib_client's to fail when add() is called")
> >> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> >> ---
> >>  drivers/infiniband/core/device.c | 10 +++++-----
> >>  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > This doesn't make any sense, you need to explain what "caller will get
> > confused" actually means
> 
> The caller cannot perform cleanup upon error, which in turn manifests as
> "unregister_netdevice: waiting for DEV to become free" message.
> Please check https://lkml.kernel.org/r/710ef3ef-cd0a-5630-a68f-628d123180bf@I-love.SAKURA.ne.jp .

Describe exactly where the "cannot perform cleanup upon error" is.

Jason

  reply	other threads:[~2023-03-28 11:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 10:52 [PATCH] RDMA: don't ignore client->add() failures Tetsuo Handa
2023-03-28 11:24 ` Jason Gunthorpe
2023-03-28 11:33   ` Tetsuo Handa
2023-03-28 11:34     ` Jason Gunthorpe [this message]
2023-03-28 14:59       ` Tetsuo Handa
2023-03-28 16:18         ` Jason Gunthorpe
2023-03-28 22:17           ` Tetsuo Handa
2023-03-29 15:44             ` Jason Gunthorpe
2023-03-29 23:51               ` Tetsuo Handa
2023-03-30 23:39                 ` Jason Gunthorpe
2023-03-31 16:19                   ` Tetsuo Handa
2023-03-31 16:23                     ` Jason Gunthorpe
2023-04-01  7:30                       ` Tetsuo Handa
2023-04-01 18:30                         ` Leon Romanovsky

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=ZCLQ0XVSKVHV1MB2@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=bmt@zurich.ibm.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=ubraun@linux.ibm.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