]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
smc: generic netlink family should be __ro_after_init
authorJohannes Berg <johannes.berg@intel.com>
Thu, 20 Sep 2018 07:27:30 +0000 (09:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 14:49:55 +0000 (07:49 -0700)
The generic netlink family is only initialized during module init,
so it should be __ro_after_init like all other generic netlink
families.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_pnet.c

index 01c6ce042a1cdb338d81167b1a495693a2a22154..7cb3e4f07c10f5da154c0322ef4fae54a6dc85e2 100644 (file)
@@ -461,7 +461,7 @@ static const struct genl_ops smc_pnet_ops[] = {
 };
 
 /* SMC_PNETID family definition */
-static struct genl_family smc_pnet_nl_family = {
+static struct genl_family smc_pnet_nl_family __ro_after_init = {
        .hdrsize = 0,
        .name = SMCR_GENL_FAMILY_NAME,
        .version = SMCR_GENL_FAMILY_VERSION,