diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-02-28 17:32:15 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-11 11:24:12 -0500 |
commit | 779ea1207b6a43943faa44f41be7311263315604 (patch) | |
tree | 5c08f4f9ff44416cfb92084cd10885697fb2016f | |
parent | 62d42a62770dd66da2d3df693e70f4e5fae1716a (diff) | |
download | linux-779ea1207b6a43943faa44f41be7311263315604.tar.bz2 |
[SCSI] libiscsi: flush work before freeing connection
It's possible that we call iscsi_xmitworker after iscsi_conn_release
which causes a oops. This patch flushes the workqueue.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/libiscsi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 7c75771c77ff..6346a913c36e 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -1597,6 +1597,9 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) wake_up(&conn->ehwait); } + /* flush queued up work because we free the connection below */ + scsi_flush_work(session->host); + spin_lock_bh(&session->lock); kfree(conn->data); kfree(conn->persistent_address); |