From ef4f67f0b892a24c7616607af644c28b77055731 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Tue, 1 Oct 2013 15:43:23 +0000 Subject: [PATCH] Fixed kernel crash when running devinfo When calling to ib_uverbs_cleanup_ucontext, there is a call to mutex_lock of xrcd_table_mutex, which was not initialized. Added missing initialization for xrcd_table_mutex. Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re --- sys/ofed/drivers/infiniband/core/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ofed/drivers/infiniband/core/device.c b/sys/ofed/drivers/infiniband/core/device.c index 6c2c2f49fa99..2f9a7b824791 100644 --- a/sys/ofed/drivers/infiniband/core/device.c +++ b/sys/ofed/drivers/infiniband/core/device.c @@ -296,6 +296,8 @@ int ib_register_device(struct ib_device *device, INIT_LIST_HEAD(&device->client_data_list); spin_lock_init(&device->event_handler_lock); spin_lock_init(&device->client_data_lock); + device->ib_uverbs_xrcd_table = RB_ROOT; + mutex_init(&device->xrcd_table_mutex); ret = read_port_table_lengths(device); if (ret) {