From: Chris Wright Date: Tue, 7 Mar 2006 05:26:56 +0000 (-0800) Subject: IB/srp fix for commands received after target removed from Roland. X-Git-Tag: v2.6.16.1~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24d97a95f29c1344e97abf3790f6500ed0ec5d17;p=thirdparty%2Fkernel%2Fstable-queue.git IB/srp fix for commands received after target removed from Roland. --- diff --git a/queue/ib-srp-don-t-send-task-management-commands-after-target-removal.patch b/queue/ib-srp-don-t-send-task-management-commands-after-target-removal.patch new file mode 100644 index 00000000000..1b4833d31b0 --- /dev/null +++ b/queue/ib-srp-don-t-send-task-management-commands-after-target-removal.patch @@ -0,0 +1,35 @@ +From stable-bounces@linux.kernel.org Mon Mar 6 20:28:25 2006 +Date: Mon, 06 Mar 2006 20:23:33 -0800 +From: Roland Dreier +To: stable@kernel.org +Cc: +Subject: [PATCH] IB/srp: Don't send task management commands after target removal + +Just fail abort and reset requests that come in after we've already +decided to remove a target. This fixes a nasty crash if a storage +target goes away. + +Signed-off-by: Roland Dreier +Signed-off-by: Chris Wright +--- + +This is upstream in Linus's tree as 1285b3a0b0aa2391ac6f6939e6737203c8220f68 + + drivers/infiniband/ulp/srp/ib_srp.c | 6 ++++++ + 1 files changed, 6 insertions(+) + +--- linux-2.6.15.6.orig/drivers/infiniband/ulp/srp/ib_srp.c ++++ linux-2.6.15.6/drivers/infiniband/ulp/srp/ib_srp.c +@@ -1154,6 +1154,12 @@ static int srp_send_tsk_mgmt(struct scsi + + spin_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; + diff --git a/queue/series b/queue/series new file mode 100644 index 00000000000..2a0d4af32f1 --- /dev/null +++ b/queue/series @@ -0,0 +1 @@ +ib-srp-don-t-send-task-management-commands-after-target-removal.patch