Blob Blame History Raw
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date: Mon, 14 Aug 2017 14:57:38 -0600
Subject: rdma: Allow demand loading of NETLINK_RDMA
Patch-mainline: v4.14-rc1
Git-commit: 1eb5be0ec79a7b21cd6b5b73d9de294dc1809e0f
References: bsc#1046306 FATE#322942

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/core/netlink.c |    3 +++
 1 file changed, 3 insertions(+)

--- 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);