]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srpt: Fix login-related race conditions
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 17 Jan 2018 00:14:13 +0000 (16:14 -0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 18 Jan 2018 19:49:26 +0000 (14:49 -0500)
commit378e1fc3918af37cb8b8f2a726d78c6de01c5226
treeb8bbb696c626492fd0e643ceee233a183fae71f9
parentcd822e8013fd129effd582a84f9722866d36a7d8
IB/srpt: Fix login-related race conditions

Make sure that sport->mutex is not released between the duplicate
channel check, adding a channel to the channel list and performing
the sport enabled check. Avoid that srpt_disconnect_ch() can be
invoked concurrently with the ib_send_cm_rep() call by
srpt_cm_req_recv().

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