smc: generic netlink family should be __ro_after_init
PATCH 1/1 smc: generic netlink family should be __ro_after_init
From: Johannes Berg <[email protected]>
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 <[email protected]>
--- net/smc/smc_pnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/smc_pnet.c +1 -1
@@ -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 ,
Signature · 1 line
2.14.4
David Miller
maintainerFrom: Johannes Berg <[email protected]>
Date: Thu, 20 Sep 2018 09:27:30 +0200
Quoted 7 lines
From: Johannes Berg <[email protected]>
The generic netlink family is only initialized during module init, so it should be
__ro_after_initlike all other generic netlink families.Signed-off-by Johannes Berg <[email protected]>
Looks good, applied.