All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernard Pidoux <bpidoux@free.fr>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Jarek Poplawski <jarkao2@o2.pl>
Subject: Re: [AX25] kernel panic
Date: Sun, 23 Mar 2008 18:00:17 +0100	[thread overview]
Message-ID: <47E68CA1.2040904@free.fr> (raw)
In-Reply-To: <20080322113620.GA3213@ami.dom.local>


Jarek Poplawski wrote:
> On Thu, Mar 20, 2008 at 11:58:35PM +0100, Bernard Pidoux wrote:
> ...
>> BUG: spinlock bad magic on CPU#0, swapper/0
>> BUG: unable to handle kernel paging request at virtual address 6b6b6c2f
>> printing eip: c01e730b *pde = 00000000
>> Oops: 0000 [#1] SMP
> ...
>> Pid: 0, comm: swapper Not tainted (2.6.24.3 #8)
>> EIP: 0060:[<c01e730b>] EFLAGS: 00010002 CPU: 0
>> EIP is at spin_bug+0xdb/0xf0
> ...
> 
> Hi,
> 
> Bernard, could you try this debugging patch?
> 
> Thanks,
> Jarek P.
> 
> ---
> 
> diff -Nurp 2.6.24.3-/net/core/sock.c 2.6.24.3+/net/core/sock.c
> --- 2.6.24.3-/net/core/sock.c	2008-01-24 23:58:37.000000000 +0100
> +++ 2.6.24.3+/net/core/sock.c	2008-03-22 12:10:10.000000000 +0100
> @@ -1517,14 +1517,21 @@ static void sock_def_write_space(struct 
>  	 * progress.  --DaveM
>  	 */
>  	if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) {
> -		if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
> +		if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) {
> +			if (!sk->sk_socket || sk->sk_socket->sk != sk) {
> +				WARN_ON_ONCE(1);
> +				sk->sk_socket = NULL;
> +				sk->sk_sleep = NULL;
> +				goto out;
> +			}
>  			wake_up_interruptible(sk->sk_sleep);
> +		}
>  
>  		/* Should agree with poll, otherwise some programs break */
>  		if (sock_writeable(sk))
>  			sk_wake_async(sk, 2, POLL_OUT);
>  	}
> -
> +out:
>  	read_unlock(&sk->sk_callback_lock);
>  }
>

Hi Jarek,

Here is the result of your patch :


WARNING: at net/core/sock.c:1522 sock_def_write_space()
Pid: 3452, comm: mkiss Not tainted 2.6.24.3 #2
  [<c010513a>] show_trace_log_lvl+0x1a/0x30
  [<c0105b52>] show_trace+0x12/0x20
  [<c01064ac>] dump_stack+0x6c/0x80
  [<c024d54b>] sock_def_write_space+0x10b/0x120
  [<c024d93a>] sock_wfree+0x3a/0x40
  [<c024fafd>] skb_release_all+0x4d/0xf0
  [<c024f2ab>] __kfree_skb+0xb/0x90
  [<c024f349>] kfree_skb+0x19/0x30
  [<c8cb5e37>] ax_xmit+0xf7/0x360 [mkiss]
  [<c0255367>] dev_hard_start_xmit+0x207/0x270
  [<c02657f4>] __qdisc_run+0x54/0x1a0
  [<c0257bac>] dev_queue_xmit+0x25c/0x330
  [<c8cc8a77>] ax25_queue_xmit+0x47/0x70 [ax25]
  [<c8cc8b65>] ax25_transmit_buffer+0xc5/0x110 [ax25]
  [<c8cc8c2d>] ax25_send_iframe+0x7d/0x110 [ax25]
  [<c8cc8d70>] ax25_kick+0xb0/0x1b0 [ax25]
  [<c8cc9e29>] ax25_std_frame_in+0x69/0x890 [ax25]
  [<c8cc7dba>] ax25_kiss_rcv+0x2ba/0x7b0 [ax25]
  [<c0254cc4>] netif_receive_skb+0x244/0x2e0
  [<c0257835>] process_backlog+0x75/0xe0
  [<c025734b>] net_rx_action+0x12b/0x1d0
  [<c011d595>] __do_softirq+0x55/0xc0
  [<c011d647>] do_softirq+0x47/0x50
  [<c011d9f5>] local_bh_enable_ip+0x95/0xe0
  [<c02babe5>] _spin_unlock_bh+0x25/0x30
  [<c8cb56b0>] mkiss_receive_buf+0x360/0x420 [mkiss]
  [<c020dfe7>] pty_write+0x47/0x60
  [<c020b5b2>] write_chan+0x222/0x330
  [<c0208c76>] tty_write+0x126/0x1b0
  [<c01728df>] vfs_write+0xaf/0x120
  [<c0172e2d>] sys_write+0x3d/0x70
  [<c010412a>] sysenter_past_esp+0x5f/0xa5
  =======================


Happy Easter,


Bernard Pidoux



  reply	other threads:[~2008-03-23 17:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 10:44 [AX25] kernel panic Bernard Pidoux F6BVP
2008-03-18 21:25 ` Francois Romieu
2008-03-19  7:36   ` Bernard Pidoux F6BVP
2008-03-19 20:57     ` Bernard Pidoux
2008-03-20  7:30       ` Jarek Poplawski
2008-03-20 22:58         ` Bernard Pidoux
2008-03-21  0:28           ` Jarek Poplawski
2008-03-21  9:52             ` Bernard Pidoux
2008-03-21 11:22               ` Jarek Poplawski
2008-03-21  9:40           ` Bernard Pidoux
2008-03-22 11:36           ` Jarek Poplawski
2008-03-23 17:00             ` Bernard Pidoux [this message]
2008-03-24 20:51               ` Jarek Poplawski
2008-03-25 13:23                 ` Bernard Pidoux
2008-03-25 20:51                   ` Jarek Poplawski
2008-03-26 18:35                   ` Jarek Poplawski
2008-03-28  8:24                     ` Bernard Pidoux
2008-03-28  8:27                     ` Bernard Pidoux
2008-03-28 12:07                     ` Jarek Poplawski
2008-03-29 12:04                       ` Bernard Pidoux
2008-03-29 12:24                         ` Jarek Poplawski
2008-03-30  8:43                           ` Bernard Pidoux
2008-03-30  9:16                             ` Jarek Poplawski
2008-03-30 17:38                               ` Bernard Pidoux
2008-03-30 18:49                                 ` Jarek Poplawski
2008-03-30  9:00                           ` Bernard Pidoux
     [not found]                           ` <47EE38BA.9090500@free.fr>
     [not found]                             ` <20080329130451.GC3407@ami.dom.local>
     [not found]                               ` <47EF6479.7030702@free.fr>
     [not found]                                 ` <20080330115958.GA4975@ami.dom.local>
2008-04-01 20:37                                   ` Bernard Pidoux
2008-04-02  6:41                                     ` [ROSE/AX25] af_rose: rose_release() fix Jarek Poplawski
2008-04-02  6:56                                       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-09-09 22:28 [AX25] kernel panic Bernard Pidoux
2009-09-11 19:21 ` Jarek Poplawski
2009-09-15 10:16   ` Bernard Pidoux
     [not found] ` <20090910142436.GB10547@linux-mips.org>
     [not found]   ` <4AA9288B.2070205@upmc.fr>
     [not found]     ` <20090911120557.GA12175@linux-mips.org>
2009-09-20  8:42       ` Bernard Pidoux
2009-09-20  9:09         ` f8arr
2009-09-20 21:02         ` Jarek Poplawski
2009-09-21  8:44           ` Bernard Pidoux
2009-09-21 20:11 Jarek Poplawski
2009-09-23 21:17 ` Bernard Pidoux F6BVP
2009-09-24  8:07   ` Jarek Poplawski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E68CA1.2040904@free.fr \
    --to=bpidoux@free.fr \
    --cc=jarkao2@gmail.com \
    --cc=jarkao2@o2.pl \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.