瀏覽代碼

[infiniband] Avoid leaving uninitialised lists in struct ib_device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 年之前
父節點
當前提交
118a0ca55a
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/net/infiniband.c

+ 2
- 0
src/net/infiniband.c 查看文件

@@ -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…
取消
儲存