IB/srpt: Don't allow reordering of commands on wait list
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 17 Jan 2018 00:14:15 +0000 (16:14 -0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 18 Jan 2018 19:49:26 +0000 (14:49 -0500)
commitfcf589364f2a106544d79594dcf722d97528031b
tree7894077b2fc9b995506ad2b897dc7a44c1921277
parente28a547da6e9c6dd5ba64b978d361222db3592e7
IB/srpt: Don't allow reordering of commands on wait list

If a receive I/O context is removed from the wait list and
srpt_handle_new_iu() fails to allocate a send I/O context then
re-adding the receive I/O context to the wait list can cause
reordering. Avoid this by only removing a receive I/O context
from the wait list after allocating a send I/O context succeeded.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h