Re: [PATCH] RDMA: don't ignore client->add() failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxx>
> >> 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@xxxxxxxxxxxxxxxxxxx>
> >> ---
> >>  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@xxxxxxxxxxxxxxxxxxx .

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

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux