diff options
author | Michael Brown | 2016-11-17 00:00:57 +0100 |
---|---|---|
committer | Michael Brown | 2016-11-17 00:03:37 +0100 |
commit | 81fceaec6eea05efb942a188c3d92dd73a1a8aa0 (patch) | |
tree | cc0eaf51e5af5c48de3696889aed1b581fb16dd9 /src/net/tcp | |
parent | [interface] Provide intf_reinit() to reinitialise nullified interfaces (diff) | |
download | ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.tar.gz ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.tar.xz ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.zip |
[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>
Diffstat (limited to 'src/net/tcp')
-rw-r--r-- | src/net/tcp/iscsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index ec004e4b..d6f80084 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 ); |