소스 검색

smc: generic netlink family should be __ro_after_init

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>
Johannes Berg 6 년 전
부모
커밋
56ce3c5a50
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      net/smc/smc_pnet.c

+ 1 - 1
net/smc/smc_pnet.c

@@ -461,7 +461,7 @@ static const struct genl_ops smc_pnet_ops[] = {
 };
 };
 
 
 /* SMC_PNETID family definition */
 /* 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,
 	.hdrsize = 0,
 	.name = SMCR_GENL_FAMILY_NAME,
 	.name = SMCR_GENL_FAMILY_NAME,
 	.version = SMCR_GENL_FAMILY_VERSION,
 	.version = SMCR_GENL_FAMILY_VERSION,