IB SRP fix for 2.6.16-rc5
Subsystems (2)
Linus, please pull from
master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
This tree is also available from kernel.org mirrors at:
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
The pull will get the following change, which fixes a potential crash when a connection to an SRP storage target is lost:
Roland Dreier:
IB/srp: Don't send task management commands after target removal
drivers/infiniband/ulp/srp/ib_srp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +6 -0
@@ -1155,6 +1155,12 @@ static int srp_send_tsk_mgmt(struct scsispin_lock_irq (target->scsi_host->host_lock); +if (target->state ==SRP_TARGET_DEAD || + target->state ==SRP_TARGET_REMOVED ) { + scmnd->result =DID_BAD_TARGET <<16 ; + goto out; + } +if (scmnd->host_scribble == (void *)-1L ) goto out;