aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2017-08-14 14:57:38 -0600
committerDoug Ledford <dledford@redhat.com>2017-08-22 17:04:22 -0400
commit1eb5be0ec79a7b21cd6b5b73d9de294dc1809e0f (patch)
treeedfbddbd45b85543267aa1ef702f07ce47c5ef28 /drivers/infiniband/core
parentIB/mlx4: use kvmalloc_array to allocate wrid (diff)
downloadlinux-dev-1eb5be0ec79a7b21cd6b5b73d9de294dc1809e0f.tar.xz
linux-dev-1eb5be0ec79a7b21cd6b5b73d9de294dc1809e0f.zip
rdma: Allow demand loading of NETLINK_RDMA
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/netlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 27352a352770..f782697cf4d8 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -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);