Skip to content

Commit

Permalink
[SCSI] iscsi bugfixes: fix oops when removing session
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Christie authored and James Bottomley committed Jul 28, 2006
1 parent 1c83469 commit 63f75cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 63f75cc

Please sign in to comment.