Skip to contentSkip to conversation

Another 2.6.25rc7 lockdep trace

DISCUSSION Dave Jones 2 participants 2 messages Mar 28, 2008 – Mar 29, 2008

Subsystems (4)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Seems different to the one I just posted. This one popped up after a barrage of random packets..

Dave

=================================
[ INFO: inconsistent lock state ]
2.6.25-0.161.rc7.fc9.i686 #1
---------------------------------
inconsistent {in-softirq-W} -> {softirq-on-R} usage. modprobe/7285 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&f->lock){-+-?}, at: [inet_frag_evictor+60/175] inet_frag_evictor+0x3c/0xaf
{in-softirq-W} state was registered at:
[__lock_acquire+1216/3089] __lock_acquire+0x4c0/0xc11 [lock_acquire+106/144] lock_acquire+0x6a/0x90 [_write_lock+28/73] _write_lock+0x1c/0x49 [inet_frag_find+216/405] inet_frag_find+0xd8/0x195 [ip_defrag+174/2168] ip_defrag+0xae/0x878

   [<d0ca53e2>] ipv4_conntrack_defrag+0x4c/0x72 [nf_conntrack_ipv4]
   [nf_iterate+47/100] nf_iterate+0x2f/0x64
   [nf_hook_slow+85/193] nf_hook_slow+0x55/0xc1
   [ip_rcv+494/551] ip_rcv+0x1ee/0x227
   [netif_receive_skb+901/968] netif_receive_skb+0x385/0x3c8
   [<d0d2488f>] e100_poll+0x165/0x2fb [e100]
   [net_rx_action+203/506] net_rx_action+0xcb/0x1fa
   [__do_softirq+132/266] __do_softirq+0x84/0x10a
   [do_softirq+121/218] do_softirq+0x79/0xda
   [<ffffffff>] 0xffffffff
 irq event stamp: 7247
 hardirqs last  enabled at (7247): [_spin_unlock_irqrestore+64/80] _spin_unlock_irqrestore+0x40/0x50
 hardirqs last disabled at (7246): [_spin_lock_irqsave+35/104] _spin_lock_irqsave+0x23/0x68
 softirqs last  enabled at (7244): [<d0e3a794>] nf_ct_iterate_cleanup+0xdc/0xfb [nf_conntrack]
 softirqs last disabled at (7242): [_spin_lock_bh+12/78] _spin_lock_bh+0xc/0x4e

other info that might help us debug this:
no locks held by modprobe/7285.

 stack backtrace:
 Pid: 7285, comm: modprobe Not tainted 2.6.25-0.161.rc7.fc9.i686 #1
  [print_usage_bug+266/279] print_usage_bug+0x10a/0x117
  [mark_lock+822/1009] mark_lock+0x336/0x3f1
  [__lock_acquire+1349/3089] __lock_acquire+0x545/0xc11
  [_spin_unlock_irq+34/47] ? _spin_unlock_irq+0x22/0x2f
  [lock_acquire+106/144] lock_acquire+0x6a/0x90
  [inet_frag_evictor+60/175] ? inet_frag_evictor+0x3c/0xaf
  [_read_lock+28/73] _read_lock+0x1c/0x49
  [inet_frag_evictor+60/175] ? inet_frag_evictor+0x3c/0xaf
  [inet_frag_evictor+60/175] inet_frag_evictor+0x3c/0xaf
  [<d0e299f2>] nf_ct_frag6_cleanup+0x26/0x28 [nf_conntrack_ipv6]
  [<d0e2a3f4>] nf_conntrack_l3proto_ipv6_fini+0x44/0x46 [nf_conntrack_ipv6]
  [sys_delete_module+418/475] sys_delete_module+0x1a2/0x1db
  [audit_syscall_entry+249/291] ? audit_syscall_entry+0xf9/0x123
  [syscall_call+7/11] syscall_call+0x7/0xb
  =======================
Signature · 1 line
http://www.codemonkey.org.uk
maintainer
#1 lore raw

From: Dave Jones <[email protected]>
Date: Thu, 27 Mar 2008 21:54:16 -0400

Quoted 5 lines
 stack backtrace:
 Pid: 7285, comm: modprobe Not tainted 2.6.25-0.161.rc7.fc9.i686 #1
  [print_usage_bug+266/279] print_usage_bug+0x10a/0x117
  [mark_lock+822/1009] mark_lock+0x336/0x3f1
  [__lock_acquire+1349/3089] __lock_acquire+0x545/0xc11
Quoted 8 lines
  [_spin_unlock_irq+34/47] ? _spin_unlock_irq+0x22/0x2f
  [lock_acquire+106/144] lock_acquire+0x6a/0x90
  [inet_frag_evictor+60/175] ? inet_frag_evictor+0x3c/0xaf
  [_read_lock+28/73] _read_lock+0x1c/0x49
  [inet_frag_evictor+60/175] ? inet_frag_evictor+0x3c/0xaf
  [inet_frag_evictor+60/175] inet_frag_evictor+0x3c/0xaf
  [<d0e299f2>] nf_ct_frag6_cleanup+0x26/0x28 [nf_conntrack_ipv6]
  [<d0e2a3f4>] nf_conntrack_l3proto_ipv6_fini+0x44/0x46 [nf_conntrack_ipv6]

Thanks for the report.

This should fix it:

commit e8e16b706e8406f1ab3bccab16932ebc513896d8

Author: David S. Miller <[email protected]>
Date:   Fri Mar 28 17:30:18 2008 -0700

[INET]: inet_frag_evictor() must run with BH disabled

Based upon a lockdep trace from Dave Jones.

net/ipv4/inet_fragment.c +3 -0
index 724d69a..a0a3c78 100644
@@ -86,7 +86,10 @@ EXPORT_SYMBOL(inet_frags_fini);
 void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
 {
 	nf->low_thresh = 0;
+
+	local_bh_disable();
 	inet_frag_evictor(nf, f);
+	local_bh_enable();
 }
 EXPORT_SYMBOL(inet_frags_exit_net);
 
net/ipv6/netfilter/nf_conntrack_reasm.c +2 -0
index 2a0d698..24c0d03 100644
@@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)
 
 static void nf_ct_frag6_evictor(void)
 {
+	local_bh_disable();
 	inet_frag_evictor(&nf_init_frags, &nf_frags);
+	local_bh_enable();
 }
 
 static void nf_ct_frag6_expire(unsigned long data)