Commit fa3c411
RDMA/core: always drop device refcount in ib_del_sub_device_and_put()
Since nldev_deldev() (introduced by commit 060c642 ("RDMA/nldev: Add
support to add/delete a sub IB device through netlink") grabs a reference
using ib_device_get_by_index() before calling ib_del_sub_device_and_put(),
we need to drop that reference before returning -EOPNOTSUPP error.
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=881d65229ca4f9ae8c84
Fixes: bca5119 ("RDMA/core: Support IB sub device with type "SMI"")
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Parav Pandit <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>1 parent de41cbc commit fa3c411
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2881 | 2881 | | |
2882 | 2882 | | |
2883 | 2883 | | |
2884 | | - | |
| 2884 | + | |
| 2885 | + | |
2885 | 2886 | | |
| 2887 | + | |
2886 | 2888 | | |
2887 | 2889 | | |
2888 | 2890 | | |
| |||
0 commit comments