[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>
This commit is contained in:
Mike Christie 2007-02-28 17:32:15 -06:00 коммит произвёл James Bottomley
Родитель 62d42a6277
Коммит 779ea1207b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

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