Skip to content
Commit 22cbc6c2 authored by Niels Dossche's avatar Niels Dossche Committed by Jason Gunthorpe
Browse files

IB/rdmavt: add missing locks in rvt_ruc_loopback

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: default avatarNiels Dossche <dossche.niels@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent f543a3e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment