net/smc: Enable module load on netlink usage
authorStefan Raspl <raspl@linux.ibm.com>
Mon, 25 Jul 2022 14:10:00 +0000 (16:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Jul 2022 12:24:42 +0000 (13:24 +0100)
Previously, the smc and smc_diag modules were automatically loaded as
dependencies of the ism module whenever an ISM device was present.
With the pending rework of the ISM API, the smc module will no longer
automatically be loaded in presence of an ISM device. Usage of an AF_SMC
socket will still trigger loading of the smc modules, but usage of a
netlink socket will not.
This is addressed by setting the correct module aliases.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Wenjia Zhang < wenjia@linux.ibm.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c
net/smc/smc_diag.c

index 6e70d9c10b7831c322b2bc79002b66e5f4d7feff..79c1318af1fefae8e6fc2fac27434e086da5b05c 100644 (file)
@@ -3515,3 +3515,4 @@ MODULE_DESCRIPTION("smc socket address family");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_NETPROTO(PF_SMC);
 MODULE_ALIAS_TCP_ULP("smc");
+MODULE_ALIAS_GENL_FAMILY(SMC_GENL_FAMILY_NAME);
index 1fca2f90a9c791fc6e72f0432bae481d67120648..80ea7d954eceb830265b4f93e50e87857334f078 100644 (file)
@@ -268,3 +268,4 @@ module_init(smc_diag_init);
 module_exit(smc_diag_exit);
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 43 /* AF_SMC */);
+MODULE_ALIAS_GENL_FAMILY(SMCR_GENL_FAMILY_NAME);