[openib-general] [git pull] IB SRP fix for 2.6.16-rc5
Roland Dreier
rdreier at cisco.com
Fri Mar 3 17:53:46 PST 2006
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(-)
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1155,6 +1155,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;
More information about the general
mailing list