-
- Downloads
[NET]: Marking struct pernet_operations __net_initdata was inappropriate
It is not safe to to place struct pernet_operations in a special section. We need struct pernet_operations to last until we call unregister_pernet_subsys. Which doesn't happen until module unload. So marking struct pernet_operations is a disaster for modules in two ways. - We discard it before we call the exit method it points to. - Because I keep struct pernet_operations on a linked list discarding it for compiled in code removes elements in the middle of a linked list and does horrible things for linked insert. So this looks safe assuming __exit_refok is not discarded for modules. Signed-off-by:Eric W. Biederman <ebiederm@xmission.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/loopback.c 1 addition, 1 deletiondrivers/net/loopback.c
- fs/proc/proc_net.c 1 addition, 1 deletionfs/proc/proc_net.c
- include/net/net_namespace.h 0 additions, 2 deletionsinclude/net/net_namespace.h
- net/core/dev.c 3 additions, 3 deletionsnet/core/dev.c
- net/core/dev_mcast.c 1 addition, 1 deletionnet/core/dev_mcast.c
- net/netlink/af_netlink.c 1 addition, 1 deletionnet/netlink/af_netlink.c
Loading
Please register or sign in to comment