aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-07-24 15:47:29 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-28 11:49:01 -0500
commit63f75cc8a7e6ce453e38a7b90cdcae83d63f1ea7 (patch)
treea85cfe4591f704ba163334c310ce824bff8fa9b5 /drivers
parent1c83469d36a9dd30dbf1fb9fc5ca3be3a0e64ff4 (diff)
[SCSI] iscsi bugfixes: fix oops when removing session
We are touching the cls_session after we have freed it. This causes a oops. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libiscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 36f520b9260..c989bc6180b 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1337,6 +1337,7 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
{
struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
struct iscsi_session *session = iscsi_hostdata(shost->hostdata);
+ struct module *owner = cls_session->transport->owner;
scsi_remove_host(shost);
@@ -1345,7 +1346,7 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
iscsi_destroy_session(cls_session);
scsi_host_put(shost);
- module_put(cls_session->transport->owner);
+ module_put(owner);
}
EXPORT_SYMBOL_GPL(iscsi_session_teardown);