]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srpt: Fix srpt_cm_req_recv() error path (1/2)
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 10 Jul 2018 17:31:58 +0000 (10:31 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 13 Jul 2018 17:55:32 +0000 (11:55 -0600)
commit382257b830c59dd41c0820afe651f6c75d3b35f1
treed27b446d72051a69436a1feb99cc6613a8a37a69
parent39f182dac0bbb99691be97ff5713e48584f45356
IB/srpt: Fix srpt_cm_req_recv() error path (1/2)

Once a target session has been allocated, if an error occurs, the session
must be freed. Since it is not safe to call blocking code from the context
of an connection manager callback, trigger target session release in this
case by calling srpt_close_ch().

Fixes: f4b54eeb7b9a ("IB/srpt: Fix login-related race conditions")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/srpt/ib_srpt.c