From e9fd7316765aeb761db3b12c03937aa824b8398a Mon Sep 17 00:00:00 2001 From: stansmith Date: Tue, 19 May 2009 19:48:10 +0000 Subject: [PATCH] [IBBUS] clear IOU PDO device extension memory before use. git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2190 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- core/bus/kernel/bus_iou_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/bus/kernel/bus_iou_mgr.c b/core/bus/kernel/bus_iou_mgr.c index 8643df8d..4e9a120f 100644 --- a/core/bus/kernel/bus_iou_mgr.c +++ b/core/bus/kernel/bus_iou_mgr.c @@ -729,6 +729,9 @@ iou_mgr_iou_add( return IB_ERROR; } + p_iou_ext = p_pdo->DeviceExtension; + memset( p_iou_ext, 0, sizeof(bus_iou_ext_t) ); + /* Initialize the device extension. */ cl_init_pnp_po_ext( p_pdo, NULL, p_pdo, bus_globals.dbg_lvl, &vfptr_iou_pnp, &vfptr_iou_query_txt ); @@ -736,7 +739,6 @@ iou_mgr_iou_add( /* Set the DO_BUS_ENUMERATED_DEVICE flag to mark it as a PDO. */ p_pdo->Flags |= DO_BUS_ENUMERATED_DEVICE; - p_iou_ext = p_pdo->DeviceExtension; p_iou_ext->pdo.dev_po_state.DeviceState = PowerDeviceD0; p_iou_ext->pdo.p_parent_ext = p_bfi->p_bus_ext; p_iou_ext->pdo.b_present = TRUE; -- 2.17.1