mirror-linux/drivers/infiniband/core
Tetsuo Handa fa3c411d21 RDMA/core: always drop device refcount in ib_del_sub_device_and_put()
Since nldev_deldev() (introduced by commit 060c642b2a ("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: syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=881d65229ca4f9ae8c84
Fixes: bca5119762 ("RDMA/core: Support IB sub device with type "SMI"")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: https://patch.msgid.link/80749a85-cbe2-460c-8451-42516013f9fa@I-love.SAKURA.ne.jp
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2025-12-21 06:45:17 -05:00
..
Makefile RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
addr.c RDMA/core: Check for the presence of LS_NLA_TYPE_DGID correctly 2025-12-16 21:30:56 -04:00
agent.c RDMA: Use %pe format specifier for error pointers 2025-09-21 07:34:49 -04:00
agent.h
cache.c RDMA/core: Rate limit GID cache warning messages 2025-06-17 14:14:53 -03:00
cgroup.c
cm.c RDMA/core: WQ_PERCPU added to alloc_workqueue users 2025-11-06 02:23:23 -05:00
cm_msgs.h
cm_trace.c
cm_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
cma.c RDMA/cm: Fix leaking the multicast GID table reference 2025-12-16 21:32:13 -04:00
cma_configfs.c
cma_priv.h RDMA/cma: Support IB service record resolution 2025-08-13 06:16:00 -04:00
cma_trace.c
cma_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
core_priv.h
counters.c RDMA/counter: Check CAP_NET_RAW check in user namespace for RDMA counters 2025-07-02 05:11:44 -04:00
cq.c RDMA/core: Add driver APIs pre_destroy_cq() and post_destroy_cq() 2025-06-25 03:49:51 -04:00
device.c RDMA/core: always drop device refcount in ib_del_sub_device_and_put() 2025-12-21 06:45:17 -05:00
ib_core_uverbs.c
iwcm.c RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction 2025-05-13 07:08:37 -04:00
iwcm.h
iwpm_msg.c
iwpm_util.c
iwpm_util.h
lag.c
mad.c IB/cm: Use separate agent w/o flow control for REP 2025-07-09 02:51:35 -04:00
mad_priv.h IB/mad: Add flow control for solicited MADs 2025-07-09 02:51:30 -04:00
mad_rmpp.c IB/mad: Add state machine to MAD layer 2025-07-09 02:51:23 -04:00
mad_rmpp.h
mr_pool.c
multicast.c
netlink.c
nldev.c RDMA/nldev: Check CAP_NET_RAW in user namespace for QP modify 2025-07-02 05:11:44 -04:00
opa_smi.h
packer.c
rdma_core.c RDMA/uverbs: Check CAP_NET_RAW in user namespace for flow create 2025-07-01 05:21:27 -04:00
rdma_core.h RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
restrack.c RDMA/restrack: Fix typos in the comments 2025-11-13 06:27:39 -05:00
restrack.h
roce_gid_mgmt.c
rw.c
sa.h
sa_query.c IB/sa: Fix sa_local_svc_timeout_ms read race 2025-09-18 05:26:26 -04:00
security.c
smi.c
smi.h
sysfs.c RDMA/core: Don't expose hw_counters outside of init net namespace 2025-03-03 07:14:48 -05:00
trace.c
ucaps.c RDMA/ucaps: Avoid format-security warning 2025-04-07 14:55:32 -03:00
ucma.c RDMA/core: RDMA/mlx5: replace use of system_unbound_wq with system_dfl_wq 2025-11-06 02:23:23 -05:00
ud_header.c
umem.c RDMA/core: Reduce cond_resched() frequency in __ib_umem_release 2025-11-26 03:15:36 -05:00
umem_dmabuf.c
umem_odp.c RDMA/core: Free pfn_list with appropriate kvfree call 2025-08-13 07:00:21 -04:00
user_mad.c
uverbs.h
uverbs_cmd.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
uverbs_ioctl.c
uverbs_main.c RDMA/uverbs: Introduce UCAP (User CAPabilities) API 2025-03-09 13:13:02 -04:00
uverbs_marshall.c RDMA/core: Remove unused ib_copy_path_rec_from_user 2024-12-24 05:00:42 -05:00
uverbs_std_types.c
uverbs_std_types_async_fd.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c RDMA/uverbs: Fix umem release in UVERBS_METHOD_CQ_CREATE 2025-10-19 07:31:25 -04:00
uverbs_std_types_device.c RDMA/uverbs: Add support for UCAPs in context creation 2025-03-09 13:13:02 -04:00
uverbs_std_types_dm.c
uverbs_std_types_dmah.c RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
uverbs_std_types_qp.c RDMA/uverbs: Check CAP_NET_RAW in user namespace for RAW QP create 2025-07-01 05:21:44 -04:00
uverbs_std_types_srq.c
uverbs_std_types_wq.c
uverbs_uapi.c RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
verbs.c RDMA/core: Fix logic error in ib_get_gids_from_rdma_hdr() 2025-12-21 04:19:51 -05:00