aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/vmd.c
diff options
context:
space:
mode:
authorParav Pandit <[email protected]>2020-01-26 14:26:46 +0000
committerJason Gunthorpe <[email protected]>2020-01-28 18:15:23 +0000
commitb4fb4cc5ba83b20dae13cef116c33648e81d2f44 (patch)
tree54131bb2aae71cd577f70fc94a7c2605be73f509 /drivers/pci/controller/vmd.c
parentRDMA/umem: Fix ib_umem_find_best_pgsz() (diff)
downloadkernel-b4fb4cc5ba83b20dae13cef116c33648e81d2f44.tar.gz
kernel-b4fb4cc5ba83b20dae13cef116c33648e81d2f44.zip
RDMA/cma: Fix unbalanced cm_id reference count during address resolve
Below commit missed the AF_IB and loopback code flow in rdma_resolve_addr(). This leads to an unbalanced cm_id refcount in cma_work_handler() which puts the refcount which was not incremented prior to queuing the work. A call trace is observed with such code flow: BUG: unable to handle kernel NULL pointer dereference at (null) [<ffffffff96b67e16>] __mutex_lock_slowpath+0x166/0x1d0 [<ffffffff96b6715f>] mutex_lock+0x1f/0x2f [<ffffffffc0beabb5>] cma_work_handler+0x25/0xa0 [<ffffffff964b9ebf>] process_one_work+0x17f/0x440 [<ffffffff964baf56>] worker_thread+0x126/0x3c0 Hence, hold the cm_id reference when scheduling the resolve work item. Fixes: 722c7b2bfead ("RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Parav Pandit <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/pci/controller/vmd.c')
0 files changed, 0 insertions, 0 deletions