]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 8 Oct 2012 15:01:22 +0000 (08:01 -0700)
commitafb4a5c7863bc076cb047ea669c4ddf00b75ab75
treee3db9da5cc44221fd3b7c24b8a898f96326e6204
parente7f037592aa784046a1da3a1d1306cabdecd884c
IB/srp: Fix a race condition

commit 220329916c72ee3d54ae7262b215a050f04a18fc upstream.

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
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srp/ib_srp.c