* already locked by net/netrom/af_netrom.c/176 @ 2005-01-14 21:42 gw1ngl 2005-01-14 22:49 ` Alan Cox 0 siblings, 1 reply; 2+ messages in thread From: gw1ngl @ 2005-01-14 21:42 UTC (permalink / raw) To: linux-kernel How do I fix this? Linux gw.w1ngl.ampr.org 2.6.10RadioAX25.1-1.2005 #8 Sun Jan 2 01:23:11 PST 2005 i686 i686 i386 GNU/Linux Gnu C 3.4.2 Gnu make 3.80 binutils 2.15.92.0.2 util-linux 2.12a mount 2.12a module-init-tools 3.1-pre5 e2fsprogs 1.35 reiserfsprogs line reiser4progs line pcmcia-cs 3.2.7 quota-tools 3.12. PPP 2.4.2 isdn4k-utils 3.3 nfs-utils 1.0.6 Linux C Library 2.3.4 Dynamic linker (ldd) 2.3.4 Procps 3.2.3 Net-tools 1.60 Kbd 1.12 Sh-utils 5.2.1 Modules Loaded ipt_MASQUERADE iptable_nat ip_conntrack iptable_filter ip_tables slip slhc ipip xfrm4_tunnel md5 ipv6 autofs4 sunrpc uhci_hcd i2c_piix4 i2c_core snd_ens1371 snd_rawmidi snd_seq_device snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc gameport e100 mii floppy dm_snapshot dm_zero dm_mirror ext3 jbd dm_mod kernel: net/netrom/nr_in.c:77: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2860) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2860) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/nr_in.c:77: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2860) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2860) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/nr_in.c:77: spin_lock(net/core/sock.c:ca9f20e0) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f20e0) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f20e0) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f20e0) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2680) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2680) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2680) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/af_netrom.c:914: spin_unlock(net/core/sock.c:ca9f2680) not locked kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f2680) already locked by net/netrom/af_netrom.c/176 kernel: net/netrom/nr_in.c:157: spin_lock(net/core/sock.c:ca9f20e0) already locked by net/netrom/af_netrom.c/176 Kevin ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: already locked by net/netrom/af_netrom.c/176 2005-01-14 21:42 already locked by net/netrom/af_netrom.c/176 gw1ngl @ 2005-01-14 22:49 ` Alan Cox 0 siblings, 0 replies; 2+ messages in thread From: Alan Cox @ 2005-01-14 22:49 UTC (permalink / raw) To: kevin; +Cc: Linux Kernel Mailing List On Gwe, 2005-01-14 at 21:42, gw1ngl wrote: > How do I fix this? > > Linux gw.w1ngl.ampr.org 2.6.10RadioAX25.1-1.2005 #8 Sun Jan 2 01:23:11 PST > 2005 i686 i686 i386 GNU/Linux Its showing up some kind of netrom locking bug. That requires someone actually fix NetROM for 2.6.10 I guess. (Be careful with 2.6 and AX.25 stuff the AX.25 stack in 2.6.9/10 is very badly broken at the protocol level because someone added a nasty flexnet type hack without thinking about real AX.25 - That mess is reverted in 2.6.9/10-ac). The important trace is the first one kernel: net/netrom/nr_in.c:77: spin_lock(net/core/sock.c:ca9f2860) already locked by net/netrom/af_netrom.c/176 We took a look twice. When a frame arrives we follow the following path: nr_rx_frame nr_find_socket (locks it) nr_process_rx_frame (still locked) nr_state{n]_machine - bang Please try the following. The AX.25 patch fixes the AX.25 mess by reverting back to 2.6.8. If you are using the -ac tree you don't need it. The netrom patch should fix the locking. I'd appreciate if you could test that and confirm for me that the problems go away. Alan --- net/netrom/nr_in.c~ 2005-01-14 23:49:12.758910136 +0000 +++ net/netrom/nr_in.c 2005-01-14 23:49:12.758910136 +0000 @@ -74,7 +74,6 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - bh_lock_sock(sk); switch (frametype) { case NR_CONNACK: { nr_cb *nr = nr_sk(sk); @@ -103,8 +102,6 @@ default: break; } - bh_unlock_sock(sk); - return 0; } @@ -116,7 +113,6 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - bh_lock_sock(sk); switch (frametype) { case NR_CONNACK | NR_CHOKE_FLAG: nr_disconnect(sk, ECONNRESET); @@ -132,8 +128,6 @@ default: break; } - bh_unlock_sock(sk); - return 0; } @@ -154,7 +148,6 @@ nr = skb->data[18]; ns = skb->data[17]; - bh_lock_sock(sk); switch (frametype) { case NR_CONNREQ: nr_write_internal(sk, NR_CONNACK); @@ -265,12 +258,10 @@ default: break; } - bh_unlock_sock(sk); - return queued; } -/* Higher level upcall for a LAPB frame */ +/* Higher level upcall for a LAPB frame - called with sk locked */ int nr_process_rx_frame(struct sock *sk, struct sk_buff *skb) { nr_cb *nr = nr_sk(sk); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/net/ax25/af_ax25.c linux-2.6.10/net/ax25/af_ax25.c --- linux.vanilla-2.6.10/net/ax25/af_ax25.c 2004-12-25 21:15:46.000000000 +0000 +++ linux-2.6.10/net/ax25/af_ax25.c 2004-12-26 22:07:44.000000000 +0000 @@ -207,8 +207,16 @@ continue; if (s->ax25_dev == NULL) continue; - if (ax25cmp(&s->source_addr, src_addr) == 0 && - ax25cmp(&s->dest_addr, dest_addr) == 0) { + if (ax25cmp(&s->source_addr, src_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->ax25_dev->dev == dev) { + if (digi != NULL && digi->ndigi != 0) { + if (s->digipeat == NULL) + continue; + if (ax25digicmp(s->digipeat, digi) != 0) + continue; + } else { + if (s->digipeat != NULL && s->digipeat->ndigi != 0) + continue; + } ax25_cb_hold(s); spin_unlock_bh(&ax25_list_lock); ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-14 23:54 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-01-14 21:42 already locked by net/netrom/af_netrom.c/176 gw1ngl 2005-01-14 22:49 ` Alan Cox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®