Skip to content

Commit

Permalink
IB/core: Init subsys if compiled to vmlinuz-core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Monakhov authored and Jason Gunthorpe committed Dec 1, 2017
1 parent 23a9cd2 commit a9cd1a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit a9cd1a6

Please sign in to comment.