summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2013-10-01 15:43:23 +0000
committeralfred <alfred@FreeBSD.org>2013-10-01 15:43:23 +0000
commit9e3370c119e179bc0e059c007bb9747e0edd216e (patch)
tree1cf0edc0231c98d57a88e5529f52afc86d327306 /sys/ofed
parent7a625ace1a94bcf74742c5b6be12d8f9a8f57b2e (diff)
downloadFreeBSD-src-9e3370c119e179bc0e059c007bb9747e0edd216e.zip
FreeBSD-src-9e3370c119e179bc0e059c007bb9747e0edd216e.tar.gz
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
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/core/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/ofed/drivers/infiniband/core/device.c b/sys/ofed/drivers/infiniband/core/device.c
index 6c2c2f4..2f9a7b8 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) {
OpenPOWER on IntegriCloud