mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 23:15:10 +03:00
[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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user