summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2017-11-27 13:39:05 +0000
committerJason Gunthorpe <jgg@mellanox.com>2017-12-01 12:21:26 -0700
commita9cd1a673737dd81332fce1145801bfacfb90d90 (patch)
tree1d613157350355e6474d272af2392b22519f3561 /drivers/infiniband
parent23a9cd2ad90543e9da3786878d2b2729c095439d (diff)
downloadblackbird-op-linux-a9cd1a673737dd81332fce1145801bfacfb90d90.tar.gz
blackbird-op-linux-a9cd1a673737dd81332fce1145801bfacfb90d90.zip
IB/core: Init subsys if compiled to vmlinuz-core
Once infiniband is compiled as a core component its subsystem must be enabled before device initialization. Otherwise there is a NULL pointer dereference during mlx4_core init, calltrace: ->device_add if (dev->class) { deref dev->class->p =>NULLPTR #Config CONFIG_NET_DEVLINK=y CONFIG_MAY_USE_DEVLINK=y CONFIG_MLX4_EN=y Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 84fc32a2c8b3..5e1be4949d5f 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1253,5 +1253,5 @@ static void __exit ib_core_cleanup(void)
MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4);
-module_init(ib_core_init);
+subsys_initcall(ib_core_init);
module_exit(ib_core_cleanup);
OpenPOWER on IntegriCloud