Files
android_kernel_xiaomi_sm8450/drivers/infiniband/sw/rdmavt
Niels Dossche 968a668376 IB/rdmavt: add missing locks in rvt_ruc_loopback
[ Upstream commit 22cbc6c2681a0a4fe76150270426e763d52353a4 ]

The documentation of the function rvt_error_qp says both r_lock and
s_lock need to be held when calling that function.
It also asserts using lockdep that both of those locks are held.
rvt_error_qp is called form rvt_send_cq, which is called from
rvt_qp_complete_swqe, which is called from rvt_send_complete, which is
called from rvt_ruc_loopback in two places. Both of these places do not
hold r_lock. Fix this by acquiring a spin_lock of r_lock in both of
these places.
The r_lock acquiring cannot be added in rvt_qp_complete_swqe because
some of its other callers already have r_lock acquired.

Link: https://lore.kernel.org/r/20220228195144.71946-1-dossche.niels@gmail.com
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:20:57 +02:00
..
2020-09-09 14:14:29 -03:00
2020-09-09 14:14:29 -03:00
2021-01-09 13:46:24 +01:00
2016-03-10 20:37:27 -05:00
2021-01-09 13:46:24 +01:00
2019-06-28 22:34:26 -03:00
2019-04-24 11:31:49 -03:00
2019-04-24 11:31:49 -03:00
2016-12-11 15:25:13 -05:00
2019-04-24 11:31:49 -03:00
2016-03-10 20:37:27 -05:00
2021-01-09 13:46:24 +01:00