linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Fwd: Re: Kernel Bug when entering something after login
@ 2007-07-26  8:47 Juergen Beisert
  2007-07-26 10:02 ` Juergen Beisert
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Beisert @ 2007-07-26  8:47 UTC (permalink / raw)
  To: linuxppc-dev

=46YI. Valid for current 2.6.22.1 kernel.

=2D---------  Forwarded Message  ----------

Subject: Re: Kernel Bug when entering something after login
Date: Wednesday 25 July 2007 21:06
=46rom: Thomas Gleixner <tglx@linutronix.de>
To: Juergen Beisert <juergen127@kreuzholzen.de>
Cc: linux-rt-users@vger.kernel.org

On Wed, 2007-07-25 at 19:00 +0200, Juergen Beisert wrote:
> [c0245db0] [c01bdb98] rt_spin_lock_slowlock+0x4c/0x224 (unreliable)
> [c0245e10] [c011823c] uart_start+0x24/0x48
> [c0245e30] [c0113ff4] n_tty_receive_buf+0x170/0xfd4
> [c0245ef0] [c010f0dc] flush_to_ldisc+0xe0/0x130
> [c0245f20] [c011b51c] mpc52xx_uart_int+0x194/0x350
> [c0245f50] [c0046dfc] handle_IRQ_event+0x6c/0x110
> [c0245f80] [c00475ec] thread_simple_irq+0x90/0xf8
> [c0245fa0] [c00479a0] do_irqd+0x34c/0x3cc
> [c0245fd0] [c0033380] kthread+0x48/0x84
> [c0245ff0] [c00104ac] kernel_thread+0x44/0x60
> Instruction dump:
> 70090008 40820144 80010064 bb410048 38210060 7c0803a6 4e800020 801c0010
> 5400003a 7c001278 7c000034 5400d97e <0f000000> 39600004 91610008 80010008
> note: IRQ-131[93] exited with preempt_count 1

Yup. That's a deadlock. In mainline this does not happen, as the
spinlock is a NOP. Turn on CONFIG_PROVE_LOCKING in mainline and you see
the problem as well.

Solution below

	tglx

Index: linux-2.6.22/drivers/serial/mpc52xx_uart.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- linux-2.6.22.orig/drivers/serial/mpc52xx_uart.c	2007-07-09
 01:32:17.000000000 +0200 +++
 linux-2.6.22/drivers/serial/mpc52xx_uart.c	2007-07-25 21:06:11.000000000
 +0200 @@ -501,7 +501,9 @@ mpc52xx_uart_int_rx_chars(struct uart_po
 		}
 	}

+	spin_unlock(&port->lock);
 	tty_flip_buffer_push(tty);
+	spin_lock(&port->lock);

 	return in_be16(&PSC(port)->mpc52xx_psc_status) & MPC52xx_PSC_SR_RXRDY;
 }


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

=2D------------------------------------------------------

=2D-=20
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
=A0Pengutronix - Linux Solutions for Science and Industry
=A0   Handelsregister: Amtsgericht Hildesheim, HRA 2686
=A0 =A0 =A0    Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: Re: Kernel Bug when entering something after login
  2007-07-26  8:47 Fwd: Re: Kernel Bug when entering something after login Juergen Beisert
@ 2007-07-26 10:02 ` Juergen Beisert
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Beisert @ 2007-07-26 10:02 UTC (permalink / raw)
  To: linuxppc-dev

On Thursday 26 July 2007 10:47, Juergen Beisert wrote:
> FYI. Valid for current 2.6.22.1 kernel.

Sorry for the noise, tglx sent it allready.

Juergen
=2D-=20
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
=A0Pengutronix - Linux Solutions for Science and Industry
=A0   Handelsregister: Amtsgericht Hildesheim, HRA 2686
=A0 =A0 =A0    Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-26 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26  8:47 Fwd: Re: Kernel Bug when entering something after login Juergen Beisert
2007-07-26 10:02 ` Juergen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).