1
0
Fork 0
alistair23-linux/drivers/infiniband
Dennis Dalessandro dc04fb60d7 IB/hfi1, qib: Ensure RCU is locked when accessing list
commit 817a68a658 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:30 +01:00
..
core RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() 2020-03-12 13:00:29 +01:00
hw IB/hfi1, qib: Ensure RCU is locked when accessing list 2020-03-12 13:00:30 +01:00
sw RDMA/siw: Fix failure handling during device creation 2020-03-12 13:00:29 +01:00
ulp scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" 2020-02-28 17:22:25 +01:00
Kconfig RDMA/odp: Use the common interval tree library instead of generic 2019-08-21 13:34:09 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00