Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ded534c authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Greg Kroah-Hartman
Browse files

IB/core: Init subsys if compiled to vmlinuz-core




[ Upstream commit a9cd1a67 ]

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: default avatarDmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ffc1b36
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1261,5 +1261,5 @@ static void __exit ib_core_cleanup(void)


MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4);
MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4);


module_init(ib_core_init);
subsys_initcall(ib_core_init);
module_exit(ib_core_cleanup);
module_exit(ib_core_cleanup);