[PATCH 5/5] ib_srp: fix an error accessing invalid memory in rport_dev_loss_timedout

From: dongsu . park
Date: Fri Aug 31 2012 - 16:01:38 EST


From: Bart Van Assche <bvanassche@xxxxxxx>

In rport_dev_loss_timedout(), rport must be obtained by accessing
the member entry dev_loss_work, not fast_io_fail_work.

Signed-off-By: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/scsi/scsi_transport_srp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
index 915b355..d796413 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -242,7 +242,7 @@ static void rport_fast_io_fail_timedout(struct work_struct *work)
{
struct srp_rport *rport =
container_of(to_delayed_work(work), struct srp_rport,
- fast_io_fail_work);
+ dev_loss_work);
struct Scsi_Host *shost;
struct srp_internal *i;

--
1.7.11.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/