netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel panic in fib_rules_lookup [2.6.27.7 vendor-patched]
@ 2010-10-12 17:14 Joe Buehler
  2010-10-12 17:40 ` Eric Dumazet
  0 siblings, 1 reply; 26+ messages in thread
From: Joe Buehler @ 2010-10-12 17:14 UTC (permalink / raw)
  To: netdev

I am seeing a kernel panic (NULL pointer) in fib_rules_lookup.  There
were some other reports for 2.6.32 back in March and May.  It looks to
me as though "rules_list" is not in a good state when fib_rules_lookup
traverses it.

My application is bringing TAP interfaces up and down and making
changes to associated routing tables at a fairly good clip (say, a few
times a second).  That use case seems to be similar to a previously
reported crash case.

This is a MIPS kernel (Cavium Octeon) running two CPUs SMP.  I am
using 2.6.27.7 patched by Cavium for hardware support reasons.  I
cannot upgrade because the vendor patches are non-trivial to
forward-port.

Here is one stack trace:

[<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
[<ffffffff814bd144>] fib_lookup+0x2c/0x48
[<ffffffff814788d8>] __ip_route_output_key+0x918/0xf38
[<ffffffff81478f30>] ip_route_output_flow+0x38/0x2e8
[<ffffffff8149fd1c>] tcp_v4_connect+0x134/0x498
[<ffffffff814aef80>] inet_stream_connect+0xf8/0x2f0
[<ffffffff81442680>] sys_connect+0xe0/0xf8
[<ffffffff8114528c>] handle_sys+0x12c/0x148

Here is another:

[<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
[<ffffffff814bd144>] fib_lookup+0x2c/0x48
[<ffffffff814b6550>] fib_validate_source+0xb0/0x4c0
[<ffffffff8147a524>] ip_route_input+0x11a4/0x13c0
[<ffffffff8147c304>] ip_rcv_finish+0x2f4/0x4c0
[<ffffffff81454220>] process_backlog+0xa8/0x160
[<ffffffff81451ea8>] net_rx_action+0x190/0x2e0
[<ffffffff81166978>] __do_softirq+0xf0/0x218
[<ffffffff81166b18>] do_softirq+0x78/0x80
[<ffffffff81100e30>] plat_irq_dispatch+0x130/0x1e0
[<ffffffff81130948>] ret_from_irq+0x0/0x4
[<ffffffff8151167c>] _cond_resched+0x34/0x50
[<ffffffff81148b60>] fpu_emulator_cop1Handler+0x90/0x1c80
[<ffffffff81136f4c>] do_cpu+0x24c/0x360
[<ffffffff81130940>] ret_from_exception+0x0/0x8

*IF* my reading of the disassembled code at point of panic is correct,
 the "pos" pointer in list_for_each_entry_rcu appears to be NULL.

Looking at the code in net/core/fib_rules.c I see some uses of the
"rules_list" using rcu and some apparently not.  Has something simple
been overlooked?

I need this fixed so will try adding a spinlock to protect rules_list
if necessary.

Joe Buehler



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-12-02 14:04 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12 17:14 kernel panic in fib_rules_lookup [2.6.27.7 vendor-patched] Joe Buehler
2010-10-12 17:40 ` Eric Dumazet
2010-10-13 11:18   ` Joe Buehler
2010-10-20 17:43   ` Joe Buehler
2010-10-20 22:05     ` Eric Dumazet
2010-10-22 20:30       ` Joe Buehler
2010-10-23  3:44         ` Eric Dumazet
2010-10-23 15:11           ` Eric Dumazet
2010-10-23 15:24             ` Eric Dumazet
2010-10-23 15:40               ` Joe Buehler
2010-10-23 16:07                 ` Eric Dumazet
2010-10-23 15:33             ` Joe Buehler
2010-10-23 16:35               ` Eric Dumazet
2010-10-23 17:37                 ` "Oleg A. Arkhangelsky"
2010-10-23 19:44                   ` Eric Dumazet
2010-10-26 18:43                     ` David Miller
2010-10-26 13:29                 ` Joe Buehler
2010-10-26 13:36                   ` Eric Dumazet
2010-10-26 13:53                     ` Joe Buehler
2010-10-26 13:58                       ` Eric Dumazet
2010-10-26 14:33                       ` Eric Dumazet
2010-10-26 14:41                         ` Joe Buehler
2010-10-27 21:01                         ` Joe Buehler
2010-10-27 21:05                           ` Eric Dumazet
2010-12-02 13:36                             ` Joe Buehler
2010-12-02 14:04                               ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).