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 Jason