Patchwork ax25 rose Re: kernel panic linux-2.6.27-rc7

login
register
mail settings
Submitter Jarek Poplawski
Date Oct. 2, 2008, 7:48 p.m.
Message ID <20081002194845.GB2664@ami.dom.local>
Download mbox | patch
Permalink /patch/2470/
State Superseded
Delegated to: David Miller
Headers show

Comments

Jarek Poplawski - Oct. 2, 2008, 7:48 p.m.
On Thu, Oct 02, 2008 at 08:20:18PM +0200, Bernard, f6bvp wrote:
> Hi Jarek,
Hi Bernard,

> 
> Finally I am able to access the faulty 2.6.27-rc7 f6bvp-9 system via
> ssh.
> I can read /var/log/kernel/message file immediately after a kernel
> failure and a reboot. 
> When this is done, the system is stable until I start FPAC suite
> applications (fpad, fpacwpd ...) as shown below.
> 
> Oct  2 16:50:00 f6bvp-9 kernel: AX25_DBG: c36fc338, 00000000, 1, 0, 0
...

This looks like the output from debugging patch #1 and I'm now more
interested with #2 (which I resend below). I also append a new patch
here (let's call this #4) to netrom. So try to use 2.6.27-rc with
these patches only:

- debugging patch #2 (net/core/sock.c)
- patch #3 (drivers/net/lib8390.c)
- patch #4 (net/netrom/af_netrom.c)


> Although I did not change anything, and contrarily to my previous
> observation, the system instability as shown above occurs
> systematically.
> There was no problem with Kernel 2.6.25-10 I was using before (with
> patches for AX25 and ROSE that are now included in 2.6.27-rc7).
> I did not try 2.6.26 on this machine, thus I cannot tell if the bug was
> already present.
> Would it be worth to test 2.6.26 ?   

Yes, but only if you think you can do it safely.

> With the SSH limited access I have from my remote site, can I continue
> this debuging effort constructively, or do we wait until I am back in
> front of the local console ?

This debugging can still oops, so it depends on you. I need some warning
log from this debugging patch #2, so if you are sure this could safely
reboot to some default kernel? Otherwise I can wait, no problem. 

Cheers,
Jarek P.

--- (debugging patch #2)

 net/core/sock.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/sock.c b/net/core/sock.c
index 2d358dd..3ad8eaa 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -960,6 +960,15 @@  void sk_free(struct sock *sk)
 {
 	struct sk_filter *filter;
 
+	if (sk->sk_socket) {
+		printk("AX25_DBG: %p, %p, %u, %u, %u, %p\n", sk, sk->sk_socket,
+			 sk->sk_family, sk->sk_type, sk->sk_protocol, sk->sk_socket->sk);
+		if (sk->sk_family == 3 && sk->sk_type == 5 && sk->sk_protocol == 240) {
+			WARN_ON_ONCE(1);
+			sock_orphan(sk);
+		}
+	}
+
 	if (sk->sk_destruct)
 		sk->sk_destruct(sk);
 

--- (patch #4)

 net/netrom/af_netrom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 532e4fa..9f1ea4a 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -525,6 +525,7 @@  static int nr_release(struct socket *sock)
 	if (sk == NULL) return 0;
 
 	sock_hold(sk);
+	sock_orphan(sk);
 	lock_sock(sk);
 	nr = nr_sk(sk);
 
@@ -548,7 +549,6 @@  static int nr_release(struct socket *sock)
 		sk->sk_state    = TCP_CLOSE;
 		sk->sk_shutdown |= SEND_SHUTDOWN;
 		sk->sk_state_change(sk);
-		sock_orphan(sk);
 		sock_set_flag(sk, SOCK_DESTROY);
 		break;