rdma: Allow demand loading of NETLINK_RDMA
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Mon, 14 Aug 2017 20:57:38 +0000 (14:57 -0600)
committerDoug Ledford <dledford@redhat.com>
Tue, 22 Aug 2017 21:04:22 +0000 (17:04 -0400)
Provide a module alias so that if userspace opens a netlink
socket for RDMA the kernel support is loaded automatically.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/netlink.c

index 27352a35277011588b926d84f07d3c14b256e7b0..f782697cf4d819557192c3487c78316de3901f9a 100644 (file)
@@ -38,6 +38,7 @@
 #include <net/net_namespace.h>
 #include <net/sock.h>
 #include <rdma/rdma_netlink.h>
+#include <linux/module.h>
 #include "core_priv.h"
 
 #include "core_priv.h"
@@ -290,3 +291,5 @@ void rdma_nl_exit(void)
 
        netlink_kernel_release(nls);
 }
+
+MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_RDMA);