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>
Showing
- drivers/acpi/event.c 2 additions, 2 deletionsdrivers/acpi/event.c
- drivers/net/gtp.c 1 addition, 1 deletiondrivers/net/gtp.c
- drivers/net/macsec.c 1 addition, 1 deletiondrivers/net/macsec.c
- drivers/net/team/team.c 2 additions, 2 deletionsdrivers/net/team/team.c
- drivers/net/wireless/mac80211_hwsim.c 2 additions, 2 deletionsdrivers/net/wireless/mac80211_hwsim.c
- drivers/scsi/pmcraid.c 2 additions, 2 deletionsdrivers/scsi/pmcraid.c
- drivers/target/target_core_user.c 1 addition, 1 deletiondrivers/target/target_core_user.c
- drivers/thermal/thermal_core.c 2 additions, 2 deletionsdrivers/thermal/thermal_core.c
- fs/dlm/netlink.c 1 addition, 1 deletionfs/dlm/netlink.c
- fs/quota/netlink.c 1 addition, 1 deletionfs/quota/netlink.c
- include/linux/genl_magic_func.h 1 addition, 1 deletioninclude/linux/genl_magic_func.h
- kernel/taskstats.c 1 addition, 1 deletionkernel/taskstats.c
- net/batman-adv/netlink.c 1 addition, 1 deletionnet/batman-adv/netlink.c
- net/core/devlink.c 1 addition, 1 deletionnet/core/devlink.c
- net/core/drop_monitor.c 1 addition, 1 deletionnet/core/drop_monitor.c
- net/hsr/hsr_netlink.c 1 addition, 1 deletionnet/hsr/hsr_netlink.c
- net/ieee802154/netlink.c 1 addition, 1 deletionnet/ieee802154/netlink.c
- net/ieee802154/nl802154.c 2 additions, 2 deletionsnet/ieee802154/nl802154.c
- net/ipv4/fou.c 1 addition, 1 deletionnet/ipv4/fou.c
- net/ipv4/tcp_metrics.c 1 addition, 1 deletionnet/ipv4/tcp_metrics.c
Loading
Please register or sign in to comment