From: Jiri Slaby <jirislaby@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Peter Zijlstra <peterz@infradead.org>,
Christophe Lermytte <christophe.lermytte@thomson.net>,
linux-kernel@vger.kernel.org
Subject: Re: mutex_lock_slowpath warning using mxser tty driver (input/output error)
Date: Tue, 21 Apr 2009 14:20:08 +0200 [thread overview]
Message-ID: <49EDB9F8.6000807@gmail.com> (raw)
In-Reply-To: <20090403003302.GB9052@cmpxchg.org>
On 04/03/2009 02:33 AM, Johannes Weiner wrote:
> On Thu, Apr 02, 2009 at 11:55:08PM +0100, Alan Cox wrote:
>> On Thu, 02 Apr 2009 22:23:57 +0200
>> Jiri Slaby <jirislaby@gmail.com> wrote:
>>
>>> On 04/02/2009 08:44 PM, Alan Cox wrote:
>>>>> It appears to want to lock a mutex in interrupt context, something
>>>>> that's a definite no-no.
>>>>>
>>>>> CCed the folks who might know a thing or two about the driver.
>>>> Moxa is not a USB driver so the USB trace at the end makes no sense at
>>>> all.
>>> Yes, unreliable stack entries, but echo_set_canon_col is called from irq
>>> context and locks mutex.
>> Which means that either the driver is calling the ldisc receive handlers
>> from an IRQ directly (not allowed) or calling the tty_flip_buffer_push
>> paths and set tty->low_latency
>>
>> 2.6.29 is the first kernel that catches this bug with warnings.
>
> It sets tty->low_latency = 1 on ->open(), unconditionally, and does
> tty_flip_buffer_push() from the interrupt handler.
>
> Both things seem to have been there for a very long time (git-blame
> says longer than git).
I have no idea why it was added in fact and so whether it is sufficient
and correct just to remove the tty->low_latency setting hence I can't
fix it on my own.
It was added when Alan merged moxa's updated driver in (from
full-linux-history git):
commit c8caa4c1a9cda2fa01fa89c29020e31f5a923e0b
Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Wed Dec 22 01:14:43 2004 -0800
[PATCH] Bring Moxa serial back into being
Moxa have released several driver updates now including support up to
2.6.8 but don't themselves feel its worth the effort of doing a cleaned
up merge for the base kernel. So I pulled their latest driver release
(1.8) and removed all the macro gunge that makes it build on
2.2.0->2.6.8. I then fixed it to run on 2.6.9/10 and fixed a bug in the
break handling.
It still doesn't do PCI hotplug but I don't have any PCI moxa cards to
really tackle that particular case.
I've also merged Adriank Bunk's two 'could be static' changes into this
diff set.
next prev parent reply other threads:[~2009-04-21 12:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 16:26 mutex_lock_slowpath warning using mxser tty driver (input/output error) Christophe Lermytte
2009-04-02 18:19 ` Peter Zijlstra
2009-04-02 18:44 ` Alan Cox
2009-04-02 20:23 ` Jiri Slaby
2009-04-02 22:55 ` Alan Cox
2009-04-03 0:33 ` Johannes Weiner
2009-04-21 12:20 ` Jiri Slaby [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-02 21:37 Christophe Lermytte
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=49EDB9F8.6000807@gmail.com \
--to=jirislaby@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=christophe.lermytte@thomson.net \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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