linux-stable/drivers/infiniband/hw
Dennis Dalessandro 817a68a658 IB/hfi1, qib: Ensure RCU is locked when accessing list
The packet handling function, specifically the iteration of the qp list
for mad packet processing misses locking RCU before running through the
list. Not only is this incorrect, but the list_for_each_entry_rcu() call
can not be called with a conditional check for lock dependency. Remedy
this by invoking the rcu lock and unlock around the critical section.

This brings MAD packet processing in line with what is done for non-MAD
packets.

Fixes: 7724105686 ("IB/hfi1: add driver files")
Link: https://lore.kernel.org/r/20200225195445.140896.41873.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-03-02 11:10:21 -04:00
..
bnxt_re RDMA subsystem updates for 5.6 2020-01-31 14:40:36 -08:00
cxgb4 RDMA/iw_cxgb4: initiate CLOSE when entering TERM 2020-02-11 14:28:00 -04:00
efa RDMA/efa: Mask access flags with the correct optional range 2020-01-29 16:41:05 -04:00
hfi1 IB/hfi1, qib: Ensure RCU is locked when accessing list 2020-03-02 11:10:21 -04:00
hns Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
i40iw Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
mlx4 IB/mlx4: Fix leak in id_map_find_del 2020-01-27 16:46:53 -04:00
mlx5 IB/mlx5: Use div64_u64 for num_var_hw_entries calculation 2020-02-14 15:21:52 -04:00
mthca mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
ocrdma IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
qedr Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
qib IB/hfi1, qib: Ensure RCU is locked when accessing list 2020-03-02 11:10:21 -04:00
usnic mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
vmw_pvrdma IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00