Browse Source

[infiniband] Avoid leaving uninitialised lists in struct ib_device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
118a0ca55a
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/net/infiniband.c

+ 2
- 0
src/net/infiniband.c View File

@@ -894,6 +894,8 @@ struct ib_device * alloc_ibdev ( size_t priv_size ) {
894 894
 	if ( ibdev ) {
895 895
 		drv_priv = ( ( ( void * ) ibdev ) + sizeof ( *ibdev ) );
896 896
 		ib_set_drvdata ( ibdev, drv_priv );
897
+		INIT_LIST_HEAD ( &ibdev->list );
898
+		INIT_LIST_HEAD ( &ibdev->open_list );
897 899
 		INIT_LIST_HEAD ( &ibdev->cqs );
898 900
 		INIT_LIST_HEAD ( &ibdev->qps );
899 901
 		ibdev->port_state = IB_PORT_STATE_DOWN;

Loading…
Cancel
Save