mirror of https://github.com/ipxe/ipxe.git
[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>pull/59/head
parent
daa8ed9274
commit
81fceaec6e
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue