Dear All,
I'm reading through SoftRoCE implementation further and I stumbled
across following inconsistent locking.
Sometimes access to qp->req.state is protected by lock qp->state_lock,
like for example here:
https://elixir.bootlin.com/linux/v5.2-rc7/source/drivers/infiniband/sw/rxe/rxe_comp.c#L488
But it is not protected inside rxe_qp_error function here:
https://elixir.bootlin.com/linux/v5.2-rc7/source/drivers/infiniband/sw/rxe/rxe_qp.c#L574
Moreover the comment to the state_lock says it protects both requester
and completer. First, completer does not have "state" variable inside
rxe_comp_info structure. Second, there is such variable inside
"rxe_resp_info" structure that is not protected.
If the goal is to protect only the state of requster, th it makes sense
to keep state_lock inside struct rxe_req_info.
If the goal is to protect all state variables, then state inside struct
rxe_resp_info should be protected.
--
Regards,
Maksym Planeta