]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Fix a race condition
authorBart Van Assche <bvanassche@acm.org>
Tue, 14 Aug 2012 13:18:53 +0000 (13:18 +0000)
committerRoland Dreier <roland@purestorage.com>
Wed, 15 Aug 2012 19:00:48 +0000 (12:00 -0700)
commit5a401a30663e11da579082d213322b3be77a9dac
tree0d89f6e3cc8f17b070c16665d3df4e883fda9ddc
parentdde762d5e7a1fb234d670e75ab8ffe3b4780e644
IB/srp: Fix a race condition

Avoid a crash caused by the scmnd->scsi_done(scmnd) call in
srp_process_rsp() being invoked with scsi_done == NULL.  This can
happen if a reply is received during or after a command abort.

Reported-by: Joseph Glanville <joseph.glanville@orionvm.com.au>
Reference: http://marc.info/?l=linux-rdma&m=134314367801595
Cc: <stable@vger.kernel.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c