Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 779ea120 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[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: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 62d42a62
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);