l2tp: fix possible oops on l2tp_eth module unload
authorJames Chapman <jchapman@katalix.com>
Tue, 22 Mar 2011 01:10:25 +0000 (18:10 -0700)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:41:55 +0000 (11:41 -0700)
commit0f00f3de4199a1f447929236e9d46a03c6d4bd64
tree6c7189fb04986b98cc9bf154b129ff3b359f0350
parent87b9903183e834678211f9b920b00edd9d11fb13
l2tp: fix possible oops on l2tp_eth module unload

BugLink: http://bugs.launchpad.net/bugs/769042

[ Upstream commit 8aa525a9340da4227797a06221ca08399006635f ]

A struct used in the l2tp_eth driver for registering network namespace
ops was incorrectly marked as __net_initdata, leading to oops when
module unloaded.

BUG: unable to handle kernel paging request at ffffffffa00ec098
IP: [<ffffffff8123dbd8>] ops_exit_list+0x7/0x4b
PGD 142d067 PUD 1431063 PMD 195da8067 PTE 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/module/l2tp_eth/refcnt
Call Trace:
 [<ffffffff8123dc94>] ? unregister_pernet_operations+0x32/0x93
 [<ffffffff8123dd20>] ? unregister_pernet_device+0x2b/0x38
 [<ffffffff81068b6e>] ? sys_delete_module+0x1b8/0x222
 [<ffffffff810c7300>] ? do_munmap+0x254/0x318
 [<ffffffff812c64e5>] ? page_fault+0x25/0x30
 [<ffffffff812c6952>] ? system_call_fastpath+0x16/0x1b

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
net/l2tp/l2tp_eth.c