Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759458Ab3GaMzX (ORCPT ); Wed, 31 Jul 2013 08:55:23 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:57456 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360Ab3GaMzW (ORCPT ); Wed, 31 Jul 2013 08:55:22 -0400 Date: Wed, 31 Jul 2013 05:55:13 -0700 From: "Paul E. McKenney" To: vinayak menon Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, getarunks@gmail.com, netdev@vger.kernel.org Subject: Re: ipv4: crash at leaf_walk_rcu Message-ID: <20130731125513.GS26694@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13073112-7408-0000-0000-0000127EAA25 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2378 Lines: 60 On Wed, Jul 31, 2013 at 04:40:47PM +0530, vinayak menon wrote: > Hi, > > A crash was seen on 3.4.5 kernel during some random wlan operations. > > CPU: Single core ARM Cortex A9. > > fib_route_seq_next was called with second argument (void *v) as 0xd6e3e360 > which is a "freed" object of the "ip_fib_trie" cache. I confirmed that the > object was freed with crash utility. > > Sequence: fib_route_seq_next->trie_nextleaf->leaf_walk_rcu > > As "v" was a freed object, inside trie_nextleaf(), node_parent_rcu() > returned an invalid tnode. But as I had enabled slab poisoning and the > object was already freed, the tnode was 0x6b6b6b6b. And this was passed to > leaf_walk_rcu and resulted in the crash. > > fib_route_seq_start, takes rcu_read_lock(), but free_leaf > calls call_rcu_bh. Can this be the problem ? > Should rcu_read_lock() in fib_route_seq_start be changed to rcu_read_lock_bh() > ? One way or the other, the RCU read-side primitives need to match the RCU update-side primitives. Adding netdev... Thanx, Paul > ---------------------------------------------------------------------------- > PC is at leaf_walk_rcu+0x10/0xa0 > LR is at fib_route_seq_next+0x58/0x74 > pc : [] lr : [] psr: a0000013 > sp : c150bee0 ip : 00000000 fp : 00000000 > r10: 00000400 r9 : 53701020 r8 : c32345c0 > r7 : 00000000 r6 : 00000001 r5 : 00000000 r4 : 00000002 > r3 : 6b6b6b6b r2 : 00000001 r1 : d6e3e360 r0 : 6b6b6b6a > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: 10c53c7d Table: 835dc059 DAC: 00000015 > > Backtrace: > [] (leaf_walk_rcu+0x10/0xa0) from [] > (fib_route_seq_next+0x58/0x74) > [] (fib_route_seq_next+0x58/0x74) from [] > (seq_read+0x2cc/0x438) > [] (seq_read+0x2cc/0x438) from [] > (proc_reg_read+0xb0/0xcc) > [] (proc_reg_read+0xb0/0xcc) from [] > (vfs_read+0xac/0x124) > [] (vfs_read+0xac/0x124) from [] (sys_read+0x38/0x64) > [] (sys_read+0x38/0x64) from [] > (ret_fast_syscall+0x0/0x48) > > Thanks, > Vinayak -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/