From: Yury Shevchuk (sizif_at_botik.ru)
Date: Thu 07 Jul 2005 - 12:30:45 BST
Hi!
Here is a little problem+solution report for vserver 1.9.5,
I am running linux 2.6.11.7 with vserver patch-2.6.11.6-vs1.9.5.12.diff.gz.
The problem: attempt to read /proc/net/route inside a vserver results
in program termination with a SIGSEGV. This is accompanied by the
following Oops:
Jul 7 13:43:42 pier20 kernel: Unable to handle kernel NULL pointer dereference at virtual address 000000e8
Jul 7 13:43:42 pier20 kernel: printing eip:
Jul 7 13:43:42 pier20 kernel: c012eacd
Jul 7 13:43:42 pier20 kernel: *pde = 00000000
Jul 7 13:43:42 pier20 kernel: Oops: 0000 [#1]
Jul 7 13:43:42 pier20 kernel: Modules linked in: drbd ipv6 nbd ipt_REJECT ipt_LOG iptable_mangle iptable_nat ip_conntrack iptable_filter ip_tables ext3 jbd dm_mod r8169 eepro100 mii genrtc unix
Jul 7 13:43:42 pier20 kernel: CPU: 0
Jul 7 13:43:42 pier20 kernel: EIP: 0060:[dev_in_nx_info+13/112] Not tainted VLI
Jul 7 13:43:42 pier20 kernel: EFLAGS: 00010282 (2.6.11)
Jul 7 13:43:42 pier20 kernel: EIP is at dev_in_nx_info+0xd/0x70
Jul 7 13:43:42 pier20 kernel: eax: 00000000 ebx: f75e2180 ecx: 02000000 edx: f6f69a40
Jul 7 13:43:42 pier20 kernel: esi: 000000ff edi: f731b480 ebp: f72d52c0 esp: f73b7e60
Jul 7 13:43:42 pier20 kernel: ds: 007b es: 007b ss: 0068
Jul 7 13:43:42 pier20 kernel: Process cat (pid: 1969, threadinfo=f73b6000 task=f6f69a40)
Jul 7 13:43:42 pier20 kernel: Stack: f75e2180 000000ff 00000201 c02a6139 00000000 f731b480 f75e2180 f7c03000
Jul 7 13:43:42 pier20 kernel: 00c09553 7849a8c0 00000003 00000000 00000000 00000000 00c0ffff 00000000
Jul 7 13:43:42 pier20 kernel: 00000000 00000000 f6f69a40 0000007f 30687465 43303009 35353930 38370933
Jul 7 13:43:42 pier20 kernel: Call Trace:
Jul 7 13:43:42 pier20 kernel: [fib_seq_show+313/432] fib_seq_show+0x139/0x1b0
Jul 7 13:43:42 pier20 kernel: [default_wake_function+0/32] default_wake_function+0x0/0x20
Jul 7 13:43:42 pier20 kernel: [fib_get_idx+46/80] fib_get_idx+0x2e/0x50
Jul 7 13:43:42 pier20 kernel: [seq_read+423/672] seq_read+0x1a7/0x2a0
Jul 7 13:43:42 pier20 kernel: [vfs_read+229/352] vfs_read+0xe5/0x160
Jul 7 13:43:42 pier20 kernel: [sys_read+81/128] sys_read+0x51/0x80
Jul 7 13:43:42 pier20 kernel: [syscall_call+7/11] syscall_call+0x7/0xb
Jul 7 13:43:42 pier20 kernel: Code: 93 30 85 c0 74 0e 39 f0 74 0a 42 39 ca 7c ef 31 c0 5b 5e c3 b8 01 00 00 00 eb f6 8d 76 00 57 56 53 8b 7c 24 14 8b 44 24 10 85 ff <8b> 90 e8 00 00 00 b8 01 00 00 00 74 46 31 c0 85 d2 74 40 8b 5a
Investigation shows that the null pointer dereference occurs when
trying to handle an "unreachable" route. "ip route ls" shows the
problem route as
unreachable 127.0.0.0/8 scope host
and in /proc/net/route it appears with * in place of device name:
pier20:~# tail -2 /proc/net/route
* 0000007F 00000000 0201 0 0 0 000000FF0 0 0
eth0 00000000 7849A8C0 0003 0 0 0 000000000 0 0
This following patch fixes the problem.
Thank you for vservers,
-- Yury Shevchuk
--- net/ipv4/fib_hash.c~ 2005-06-04 13:39:21.000000000 +0400
+++ net/ipv4/fib_hash.c 2005-07-07 13:32:14.000000000 +0400
@@ -998,6 +998,7 @@
mask = FZ_MASK(iter->zone);
flags = fib_flag_trans(fa->fa_type, mask, fi);
if (fi && (!vx_flags(VXF_HIDE_NETIF, 0) ||
+ !fi->fib_dev ||
dev_in_nx_info(fi->fib_dev, current->nx_info)))
snprintf(bf, sizeof(bf),
"%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver