iscsi: Abort data-out tasks queued on a terminating session.
cfiscsi_datamove_out() can race with cfiscsi_session_terminate_tasks() and enqueue a new task after the latter function has aborted existing tasks. This could result in a deadlock as cfiscsi_session_terminate_tasks() waited forever for this task to complete. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31892
This commit is contained in:
parent
529364b032
commit
0cd6e85e24
@ -2783,6 +2783,11 @@ cfiscsi_datamove_out(union ctl_io *io)
|
||||
cdw->cdw_r2t_end = io->scsiio.ext_data_filled + r2t_len;
|
||||
|
||||
CFISCSI_SESSION_LOCK(cs);
|
||||
if (cs->cs_terminating) {
|
||||
CFISCSI_SESSION_UNLOCK(cs);
|
||||
cfiscsi_data_wait_abort(cs, cdw, 44);
|
||||
return;
|
||||
}
|
||||
TAILQ_INSERT_TAIL(&cs->cs_waiting_for_data_out, cdw, cdw_next);
|
||||
CFISCSI_SESSION_UNLOCK(cs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user