kernel: reorganize 2.6.38 patches, clean up block2mtd patches
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.38 / 010-l2tp_fix_oops_backport.patch
1 commit 8aa525a9340da4227797a06221ca08399006635f
2 Author: James Chapman <jchapman@katalix.com>
3 Date: Mon Mar 21 18:10:25 2011 -0700
4
5 l2tp: fix possible oops on l2tp_eth module unload
6
7 A struct used in the l2tp_eth driver for registering network namespace
8 ops was incorrectly marked as __net_initdata, leading to oops when
9 module unloaded.
10
11 BUG: unable to handle kernel paging request at ffffffffa00ec098
12 IP: [<ffffffff8123dbd8>] ops_exit_list+0x7/0x4b
13 PGD 142d067 PUD 1431063 PMD 195da8067 PTE 0
14 Oops: 0000 [#1] SMP
15 last sysfs file: /sys/module/l2tp_eth/refcnt
16 Call Trace:
17 [<ffffffff8123dc94>] ? unregister_pernet_operations+0x32/0x93
18 [<ffffffff8123dd20>] ? unregister_pernet_device+0x2b/0x38
19 [<ffffffff81068b6e>] ? sys_delete_module+0x1b8/0x222
20 [<ffffffff810c7300>] ? do_munmap+0x254/0x318
21 [<ffffffff812c64e5>] ? page_fault+0x25/0x30
22 [<ffffffff812c6952>] ? system_call_fastpath+0x16/0x1b
23
24 Signed-off-by: James Chapman <jchapman@katalix.com>
25 Signed-off-by: David S. Miller <davem@davemloft.net>
26
27 --- a/net/l2tp/l2tp_eth.c
28 +++ b/net/l2tp/l2tp_eth.c
29 @@ -283,7 +283,7 @@ static __net_init int l2tp_eth_init_net(
30 return 0;
31 }
32
33 -static __net_initdata struct pernet_operations l2tp_eth_net_ops = {
34 +static struct pernet_operations l2tp_eth_net_ops = {
35 .init = l2tp_eth_init_net,
36 .id = &l2tp_eth_net_id,
37 .size = sizeof(struct l2tp_eth_net),