genetlink: mark families as __ro_after_init
authorJohannes Berg <johannes.berg@intel.com>
Mon, 24 Oct 2016 12:40:05 +0000 (14:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Oct 2016 20:16:09 +0000 (16:16 -0400)
commit56989f6d8568c21257dcec0f5e644d5570ba3281
tree60a6b44865e68e25dbc8bcc38d0000e12106f2d8
parent2ae0f17df1cd52aafd1ab0415ea1f1dd56dc0e2a
genetlink: mark families as __ro_after_init

Now genl_register_family() is the only thing (other than the
users themselves, perhaps, but I didn't find any doing that)
writing to the family struct.

In all families that I found, genl_register_family() is only
called from __init functions (some indirectly, in which case
I've add __init annotations to clarifly things), so all can
actually be marked __ro_after_init.

This protects the data structure from accidental corruption.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
35 files changed:
drivers/acpi/event.c
drivers/net/gtp.c
drivers/net/macsec.c
drivers/net/team/team.c
drivers/net/wireless/mac80211_hwsim.c
drivers/scsi/pmcraid.c
drivers/target/target_core_user.c
drivers/thermal/thermal_core.c
fs/dlm/netlink.c
fs/quota/netlink.c
include/linux/genl_magic_func.h
kernel/taskstats.c
net/batman-adv/netlink.c
net/core/devlink.c
net/core/drop_monitor.c
net/hsr/hsr_netlink.c
net/ieee802154/netlink.c
net/ieee802154/nl802154.c
net/ipv4/fou.c
net/ipv4/tcp_metrics.c
net/ipv6/ila/ila_xlat.c
net/irda/irnetlink.c
net/l2tp/l2tp_netlink.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netlabel/netlabel_calipso.c
net/netlabel/netlabel_cipso_v4.c
net/netlabel/netlabel_mgmt.c
net/netlabel/netlabel_unlabeled.c
net/netlink/genetlink.c
net/nfc/netlink.c
net/openvswitch/datapath.c
net/tipc/netlink.c
net/tipc/netlink_compat.c
net/wimax/stack.c
net/wireless/nl80211.c