diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-01-30 03:53:27 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-04 03:11:11 +0100 |
commit | 180211b841b5bf13ab10d19202adab3eb7749f6c (patch) | |
tree | eeb1a2a2136e03a4a38dc09d26b8dd83b47994c9 /Documentation/networking/generic_netlink.txt | |
parent | connector: Delete buggy notification code. (diff) | |
download | linux-180211b841b5bf13ab10d19202adab3eb7749f6c.tar.xz linux-180211b841b5bf13ab10d19202adab3eb7749f6c.zip |
af_key: fix netns ops ordering on module load/unload
1. After sock_register() returns, it's possible to create sockets,
even if module still not initialized fully (blame generic module code
for that!)
2. Consequently, pfkey_create() can be called with pfkey_net_id still not
initialized which will BUG_ON in net_generic():
kernel BUG at include/net/netns/generic.h:43!
3. During netns shutdown, netns ops should be unregistered after
key manager unregistered because key manager calls can be triggered
from xfrm_user module:
general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
pfkey_broadcast+0x111/0x210 [af_key]
pfkey_send_notify+0x16a/0x300 [af_key]
km_state_notify+0x41/0x70
xfrm_flush_sa+0x75/0x90 [xfrm_user]
4. Unregister netns ops after socket ops just in case and for symmetry.
Reported by Luca Tettamanti.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/generic_netlink.txt')
0 files changed, 0 insertions, 0 deletions