From: Andrew Morton <akpm@osdl.org>
To: "Diego Calleja García" <aradorlinux@yahoo.es>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: Re: 2.6.0-test11-mm1
Date: Wed, 17 Dec 2003 14:01:39 -0800 [thread overview]
Message-ID: <20031217140139.1ae616b4.akpm@osdl.org> (raw)
In-Reply-To: <20031217192225.58842400.aradorlinux@yahoo.es>
Diego Calleja García <aradorlinux@yahoo.es> wrote:
>
> local_bh_enable() was called in hard irq context. This is probably a bug
> Call Trace:
> [<c0127b96>] local_bh_enable+0x96/0xa0
> [<e08fc4d8>] ppp_asynctty_receive+0x78/0xd0 [ppp_async]
> [<c01cec6c>] flush_to_ldisc+0xdc/0x130
> [<c01ecc17>] receive_chars+0x227/0x240
> [<c01eccd5>] transmit_chars+0xa5/0xe0
> [<c01ecf7c>] serial8250_interrupt+0x12c/0x130
> [<c010c9f9>] handle_IRQ_event+0x49/0x80
> [<c010cdc8>] do_IRQ+0xb8/0x180
> [<c02ca760>] common_interrupt+0x18/0x20
ppp_asynctty_receive() is called from hard IRQ context and hence may not use
spin_unlock_bh(). The patch converts ppp to use an IRQ-safe spinlock.
25-akpm/drivers/net/ppp_async.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff -puN drivers/net/ppp_async.c~ppp-locking-fix drivers/net/ppp_async.c
--- 25/drivers/net/ppp_async.c~ppp-locking-fix Wed Dec 17 13:57:33 2003
+++ 25-akpm/drivers/net/ppp_async.c Wed Dec 17 13:58:27 2003
@@ -321,12 +321,13 @@ ppp_asynctty_receive(struct tty_struct *
char *flags, int count)
{
struct asyncppp *ap = ap_get(tty);
+ unsigned long flags;
if (ap == 0)
return;
- spin_lock_bh(&ap->recv_lock);
+ spin_lock_irqsave(&ap->recv_lock, flags);
ppp_async_input(ap, buf, flags, count);
- spin_unlock_bh(&ap->recv_lock);
+ spin_unlock_irqrestore(&ap->recv_lock, flags);
ap_put(ap);
if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
&& tty->driver->unthrottle)
@@ -396,9 +397,9 @@ ppp_async_ioctl(struct ppp_channel *chan
if (get_user(val, (int *) arg))
break;
ap->flags = val & ~SC_RCV_BITS;
- spin_lock_bh(&ap->recv_lock);
+ spin_lock_irq(&ap->recv_lock);
ap->rbits = val & SC_RCV_BITS;
- spin_unlock_bh(&ap->recv_lock);
+ spin_unlock_irq(&ap->recv_lock);
err = 0;
break;
_
next prev parent reply other threads:[~2003-12-17 22:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-17 9:43 2.6.0-test11-mm1 Andrew Morton
2003-12-17 10:13 ` Question about UFS/UFS2 Niraj Kumar
2003-12-17 10:37 ` 2.6.0-test11-mm1 Andrew Walrond
2003-12-17 11:11 ` 2.6.0-test11-mm1 Christian Axelsson
2003-12-17 11:51 ` 2.6.0-test11-mm1 Andrew Morton
2003-12-18 3:24 ` 2.6.0-test11-mm1 Thomas Molina
2003-12-18 3:36 ` 2.6.0-test11-mm1 Andrew Morton
2003-12-19 18:21 ` 2.6.0-test11-mm1 Jens Axboe
2003-12-17 11:52 ` 2.6.0-test11-mm1 Andrew Morton
2003-12-17 13:30 ` 2.6.0-test11-mm1 Felipe Alfaro Solana
2003-12-17 11:57 ` UP build broken (Re: 2.6.0-test11-mm1) Dagfinn Ilmari Mannsåker
2003-12-17 11:55 ` Luiz Fernando Capitulino
2003-12-17 13:56 ` 2.6.0-test11-mm1 Zwane Mwaikambo
2003-12-17 18:22 ` 2.6.0-test11-mm1 Diego Calleja García
2003-12-17 22:01 ` Andrew Morton [this message]
2003-12-17 23:59 ` 2.6.0-test11-mm1 Paul Mackerras
2003-12-19 16:58 ` [patch] 2.6.0-test11-mm1: isdn/eicon/eicon_mod.c doesn't compile Adrian Bunk
2003-12-26 18:22 ` SUCCESS Re: 2.6.0-test11-mm1 Matthias Urlichs
2003-12-26 19:15 ` Linus Torvalds
2003-12-28 21:59 ` Matthias Urlichs
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=20031217140139.1ae616b4.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=aradorlinux@yahoo.es \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/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 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®