]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[iscsi] Avoid potential infinite loops during shutdown
authorMichael Brown <mcb30@ipxe.org>
Wed, 16 Nov 2016 23:00:57 +0000 (23:00 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 16 Nov 2016 23:03:37 +0000 (23:03 +0000)
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>
src/net/tcp/iscsi.c

index ec004e4badadaad99d88ae09faa153c29079d150..d6f80084def4783c64f07845ae92273010c19edf 100644 (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 );