diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2018-01-17 03:14:15 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-01-18 22:49:26 +0300 |
commit | fcf589364f2a106544d79594dcf722d97528031b (patch) | |
tree | 7894077b2fc9b995506ad2b897dc7a44c1921277 /drivers/infiniband/ulp/srpt/ib_srpt.h | |
parent | e28a547da6e9c6dd5ba64b978d361222db3592e7 (diff) | |
download | linux-fcf589364f2a106544d79594dcf722d97528031b.tar.xz |
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>
Diffstat (limited to 'drivers/infiniband/ulp/srpt/ib_srpt.h')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index 59261d5de292..10f9b2667ef2 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -261,6 +261,7 @@ enum rdma_ch_state { * @spinlock: Protects free_list and state. * @free_list: Head of list with free send I/O contexts. * @state: channel state. See also enum rdma_ch_state. + * @processing_wait_list: Whether or not cmd_wait_list is being processed. * @ioctx_ring: Send ring. * @ioctx_recv_ring: Receive I/O context ring. * @list: Node in srpt_nexus.ch_list. @@ -295,6 +296,7 @@ struct srpt_rdma_ch { struct list_head list; struct list_head cmd_wait_list; uint16_t pkey; + bool processing_wait_list; struct se_session *sess; u8 sess_name[24]; struct work_struct release_work; |