diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-02-28 18:32:15 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-11 12:24:12 -0400 |
commit | 779ea1207b6a43943faa44f41be7311263315604 (patch) | |
tree | 5c08f4f9ff44416cfb92084cd10885697fb2016f /drivers/scsi/libiscsi.c | |
parent | 62d42a62770dd66da2d3df693e70f4e5fae1716a (diff) |
[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>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-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) | |||
1597 | wake_up(&conn->ehwait); | 1597 | wake_up(&conn->ehwait); |
1598 | } | 1598 | } |
1599 | 1599 | ||
1600 | /* flush queued up work because we free the connection below */ | ||
1601 | scsi_flush_work(session->host); | ||
1602 | |||
1600 | spin_lock_bh(&session->lock); | 1603 | spin_lock_bh(&session->lock); |
1601 | kfree(conn->data); | 1604 | kfree(conn->data); |
1602 | kfree(conn->persistent_address); | 1605 | kfree(conn->persistent_address); |