提交 779ea120 编写于 作者: M Mike Christie 提交者: James Bottomley

[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: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 62d42a62
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册