]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: Fix race condition between requester and completer
authorYonatan Cohen <yonatanc@mellanox.com>
Wed, 7 Sep 2016 11:04:06 +0000 (14:04 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 16 Sep 2016 18:14:08 +0000 (14:14 -0400)
commit12a331bbdc12ef883ce94c1204826a8a78834558
tree0f4fad28a660a0496540b598c08cbf713005bd94
parent84e5cafe19adf7fa039a2ea9569a5cc7a68e9252
IB/rxe: Fix race condition between requester and completer

rxe_requester() is sending a pkt with rxe_xmit_packet() and
then calls rxe_update() to update the wqe and qp's psn values.
But sometimes the response is received before the requester
had time to update the wqe in which case the completer
acts on errornous wqe values.
This fix updates the wqe and qp before actually sending
the request and rolls back when xmit fails.

Fixes: 5deaf88696f1 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_req.c