Browse Source

[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>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
81fceaec6e
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/net/tcp/iscsi.c

+ 1
- 0
src/net/tcp/iscsi.c View File

231
 	process_del ( &iscsi->process );
231
 	process_del ( &iscsi->process );
232
 
232
 
233
 	/* Shut down interfaces */
233
 	/* Shut down interfaces */
234
+	intf_nullify ( &iscsi->data ); /* avoid potential loops */
234
 	intf_shutdown ( &iscsi->socket, rc );
235
 	intf_shutdown ( &iscsi->socket, rc );
235
 	intf_shutdown ( &iscsi->control, rc );
236
 	intf_shutdown ( &iscsi->control, rc );
236
 	intf_shutdown ( &iscsi->data, rc );
237
 	intf_shutdown ( &iscsi->data, rc );

Loading…
Cancel
Save