david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[iscsi] Avoid potential infinite loops during shutdown

The command and data interfaces may be connected to the same object.
Nullify the data interface before shutting down the control interface
to avoid potential infinite loops.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2016-11-16 23:00:57 +00:00
parent daa8ed9274
commit 81fceaec6e
1 changed files with 1 additions and 0 deletions

View File

@ -231,6 +231,7 @@ static void iscsi_close ( struct iscsi_session *iscsi, int rc ) {
process_del ( &iscsi->process );
/* Shut down interfaces */
intf_nullify ( &iscsi->data ); /* avoid potential loops */
intf_shutdown ( &iscsi->socket, rc );
intf_shutdown ( &iscsi->control, rc );
intf_shutdown ( &iscsi->data, rc );