Message ID | 1597749370-631500-1-git-send-email-wubo40@huawei.com |
---|---|
State | New |
Headers | show |
Series | target:iscsi-target:Fix null pointer access while logout the iscsi session | expand |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index c968961..a8ea4a7 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -4387,6 +4387,8 @@ int iscsit_close_session(struct iscsi_session *sess) } } + target_sess_cmd_list_set_waiting(sess->se_sess); + target_wait_for_sess_cmds(sess->se_sess); transport_deregister_session(sess->se_sess); if (sess->sess_ops->ErrorRecoveryLevel == 2)