diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-11-16 23:00:57 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-11-16 23:03:37 +0000 |
commit | 81fceaec6eea05efb942a188c3d92dd73a1a8aa0 (patch) | |
tree | cc0eaf51e5af5c48de3696889aed1b581fb16dd9 | |
parent | daa8ed9274d91a157dc049f00792f62c98b0a11a (diff) | |
download | ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.zip ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.tar.gz ipxe-81fceaec6eea05efb942a188c3d92dd73a1a8aa0.tar.bz2 |
[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>
-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 ec004e4..d6f8008 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 ); |