Re: Fw: [PACKET]: Fix /proc/net/packet crash due to bogus private pointer
On Sat, Dec 15, 2007 at 11:56:04PM -0800, Andrew Morton wrote: On Sun, 16 Dec 2007 01:37:01 -0500 Miles Lane [EMAIL PROTECTED] wrote: On Sun, Dec 16, 2007 at 11:07:07AM +0800, Herbert Xu wrote: So I posted this patch after 19:00 PST on 15 Dec. Dec 15 13:44:39 syntropy kernel: #0: (p-lock){--..}, at: [crypto_algapi:seq_read+0x25/0x191c1] seq_read+0x25/0x26f So your kernel is still feeding garbage into lockdep. Are you really really sure that kernel had Herbert's patch applied? The above log message is stamped as 13:44 PST. I gotta say this doesn't look good :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: [PACKET]: Fix /proc/net/packet crash due to bogus private pointer
On Sun, 16 Dec 2007 15:10:14 -0500 Miles Lane [EMAIL PROTECTED] wrote: On Dec 16, 2007 3:19 AM, Herbert Xu [EMAIL PROTECTED] wrote: On Sat, Dec 15, 2007 at 11:56:04PM -0800, Andrew Morton wrote: On Sun, 16 Dec 2007 01:37:01 -0500 Miles Lane [EMAIL PROTECTED] wrote: On Sun, Dec 16, 2007 at 11:07:07AM +0800, Herbert Xu wrote: So I posted this patch after 19:00 PST on 15 Dec. Dec 15 13:44:39 syntropy kernel: #0: (p-lock){--..}, at: [crypto_algapi:seq_read+0x25/0x191c1] seq_read+0x25/0x26f So your kernel is still feeding garbage into lockdep. Are you really really sure that kernel had Herbert's patch applied? The above log message is stamped as 13:44 PST. I gotta say this doesn't look good :) Yes, I did have the patch applied, but I had reenabled LOCKDEP_DEBUG. I just tried with the LOCKDEP_DEBUG stuff turned off, and with this configuration, the problem is resolved. It seems that the patch you made does fix the problem with /proc/net/packet. This new issue seems to be a different problem. So, I tried building another kernel with LOCKDEP enabled (.config attached): With this kernel, I got: Dec 16 11:21:39 syntropy kernel: [ 278.723108] process `tail' is using deprecated sysctl (syscall) net.ipv6.neigh.default.retrans_time; Use net.ipv6.neigh.default.retrans_time_ms instead. Dec 16 11:21:40 syntropy kernel: [ 279.226103] in_atomic():1, irqs_disabled():0 Dec 16 11:21:40 syntropy kernel: [ 279.226106] no locks held by tail/6208. Dec 16 11:21:40 syntropy kernel: [ 279.226109] Pid: 6208, comm: tail Not tainted 2.6.24-rc5-mm1 #5 Dec 16 11:21:40 syntropy kernel: [ 279.226112] [show_trace_log_lvl+0x12/0x25] show_trace_log_lvl+0x12/0x25 Dec 16 11:21:40 syntropy kernel: [ 279.226121] [show_trace+0xd/0x10] show_trace+0xd/0x10 Dec 16 11:21:40 syntropy kernel: [ 279.226126] [sbp2:dump_stack+0x57/0x17c1] dump_stack+0x57/0x5f Dec 16 11:21:40 syntropy kernel: [ 279.226130] [firewire_core:__might_sleep+0xd7/0x29a] __might_sleep+0xd7/0xde Dec 16 11:21:40 syntropy kernel: [ 279.226136] [parport:copy_to_user+0x32/0xd13f] copy_to_user+0x32/0x47 Dec 16 11:21:40 syntropy kernel: [ 279.226141] [add_to_pagemap+0x29/0x56] add_to_pagemap+0x29/0x56 Dec 16 11:21:40 syntropy kernel: [ 279.226147] [pagemap_pte_range+0x74/0xb1] pagemap_pte_range+0x74/0xb1 Dec 16 11:21:40 syntropy kernel: [ 279.226151] [walk_page_range+0x115/0x1dc] walk_page_range+0x115/0x1dc Dec 16 11:21:40 syntropy kernel: [ 279.226157] [pagemap_read+0x154/0x1e8] pagemap_read+0x154/0x1e8 Dec 16 11:21:40 syntropy kernel: [ 279.226161] [vfs_read+0xa2/0x11e] vfs_read+0xa2/0x11e Dec 16 11:21:40 syntropy kernel: [ 279.226166] [sys_read+0x3b/0x60] sys_read+0x3b/0x60 Dec 16 11:21:40 syntropy kernel: [ 279.226170] [sysenter_past_esp+0x6b/0xc1] sysenter_past_esp+0x6b/0xc1 (Can you find a way to fix that wordwrapping please?) Yes, this is a different bug - the pagemap stuff is doing userspace access under kmap_atomic() - we discovered this a couple of days ago and Matt has been informed. It's relatively harmless and if that's the only problem you're observing then I think we're OK here. -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: [PACKET]: Fix /proc/net/packet crash due to bogus private pointer
On Sun, 16 Dec 2007 01:37:01 -0500 Miles Lane [EMAIL PROTECTED] wrote: argh, please don't use linux-net. It's basically dead afaik. Suitable ccs restored. On Sun, Dec 16, 2007 at 11:07:07AM +0800, Herbert Xu wrote: I suspect namespace borkage. But just because you pin-pointed my patch I'll try to track it down :) Surprise surprise. The namespace seq patch missed two spots in AF_PACKET. [PACKET]: Fix /proc/net/packet crash due to bogus private pointer The seq_open_net patch changed the meaning of seq-private. Unfortunately it missed two spots in AF_PACKET, which still used the old way of dereferencing seq-private, thus causing weird and wonderful crashes when reading /proc/net/packet. This patch fixes them. Signed-off-by: Herbert Xu [EMAIL PROTECTED] diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 485af56..43e49f4 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1878,7 +1878,7 @@ static void *packet_seq_start(struct seq_file *seq, loff_t *pos) static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos) { - struct net *net = seq-private; + struct net *net = seq_file_net(seq); ++*pos; return (v == SEQ_START_TOKEN) ? sk_head(net-packet.sklist) @@ -1887,7 +1887,7 @@ static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos) static void packet_seq_stop(struct seq_file *seq, void *v) { - struct net *net = seq-private; + struct net *net = seq_file_net(seq); read_unlock(net-packet.sklist_lock); } ... Hmm. I tried compiling again with this patch applied and lockdep turned back on, and got the following (I will try again with lockdep turned back off): Dec 15 13:44:39 syntropy kernel: process `cat' is using deprecated sysctl (syscall) net.ipv6.neigh.default.retrans_time; Use net.ipv6.neigh.default.retrans_time_ms instead. Dec 15 13:44:39 syntropy kernel: Dec 15 13:44:39 syntropy kernel: = Dec 15 13:44:39 syntropy kernel: [ BUG: bad unlock balance detected! ] Dec 15 13:44:39 syntropy kernel: - Dec 15 13:44:39 syntropy kernel: cat/4819 is trying to release lock (kkkA5ȦFDDF) at: Dec 15 13:44:39 syntropy kernel: [packet_seq_stop+0xe/0x10] packet_seq_stop+0xe/0x10 Dec 15 13:44:39 syntropy kernel: but there are no more locks to release! Dec 15 13:44:39 syntropy kernel: Dec 15 13:44:39 syntropy kernel: other info that might help us debug this: Dec 15 13:44:39 syntropy kernel: 2 locks held by cat/4819: Dec 15 13:44:39 syntropy kernel: #0: (p-lock){--..}, at: [crypto_algapi:seq_read+0x25/0x191c1] seq_read+0x25/0x26f So your kernel is still feeding garbage into lockdep. Are you really really sure that kernel had Herbert's patch applied? -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html