From: Michael Brown Date: Wed, 16 Nov 2016 23:00:57 +0000 (+0000) Subject: [iscsi] Avoid potential infinite loops during shutdown X-Git-Tag: v1.20.1~350 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fceaec6eea05efb942a188c3d92dd73a1a8aa0;p=thirdparty%2Fipxe.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 --- diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index ec004e4ba..d6f80084d 100644 --- a/src/net/tcp/iscsi.c +++ b/src/net/tcp/iscsi.c @@ -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 );