2003-07-06 13:47:24

by Remi Colinet

[permalink] [raw]
Subject: 2.5.74 / oops with ppp_synctty and local_bh_enable

Module Size Used by
n_hdlc 14852 1
ppp_synctty 14592 1
3c59x 38440 0
usbmouse 9472 0
usbkbd 11264 0
hid 29440 0
uhci_hcd 39048 0
usbcore 124372 6 usbmouse,usbkbd,hid,uhci_hcd


Attachments:
.config (24.30 kB)
lsmod.2.5 (330.00 B)
Download all attachments

2003-07-07 15:32:55

by Paul Fulghum

[permalink] [raw]
Subject: Re: 2.5.74 / oops with ppp_synctty and local_bh_enable

> I'm using the Alcatel SpeedTouch modem. It is working fine. :-)
> Meanwhile, when the pppd process is killed, the following oops appears.
> ...
> Jul 6 15:30:04 tigre01 kernel: Badness in local_bh_enable at
kernel/softirq.c:109
> Jul 6 15:30:04 tigre01 kernel: Call Trace:
> Jul 6 15:30:04 tigre01 kernel: [<c0129265>] local_bh_enable+0x85/0xa0
> Jul 6 15:30:04 tigre01 kernel: [<e982fe73>] ppp_sync_push+0xd3/0x280
[ppp_synctty]
> Jul 6 15:30:04 tigre01 kernel: [<e982f768>] ppp_sync_wakeup+0x28/0x60
[ppp_synctty]
> Jul 6 15:30:04 tigre01 kernel: [<c0226e32>] do_tty_hangup+0x492/0x560


The problem is that do_tty_hangup() in tty_io.h calls the
write wakeup callback with disabled interrupts. The
notes in this function question the validity of disabling
interrupts at that point. I'm not familiar enough with the
locking issues for this function to comment.

At some point ppp_synctty.c was changed to use
spin_lock_bh and spin_unlock_bh in the write wakeup callback.
These macros complain when called with interrupts disabled.

Perhaps changing ppp_synctty.c to use spin_lock_irqsave
and spin_lock_irqrestore is the best fix.

Paul Fulghum, [email protected]
Microgate Corporation, http://www.microgate.com

2003-07-08 09:06:17

by Ravikiran G Thirumalai

[permalink] [raw]
Subject: Re: 2.5.74 / oops with ppp_synctty and local_bh_enable

On Mon, Jul 07, 2003 at 10:47:48AM -0500, Paul Fulghum wrote:
> ...
> Perhaps changing ppp_synctty.c to use spin_lock_irqsave
> and spin_lock_irqrestore is the best fix.

My 2 cents would be to keep it as it is. BK says WARN_ON was used
in place of BUG_ON in local_bh_enable just for the the ppp ldisc.

We all know tty locking is broken and needs rewrite, but
if we kill such symptoms at driver level, it'll probably deprive
some data points to whoever rewrites the tty layer.

Thanks,
Kiran