From: Jason Wessel <jason.wessel@windriver.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
David Airlie <airlied@linux.ie>,
David Miller <davem@davemloft.net>,
Fenghua Yu <fenghua.yu@intel.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Russell King <linux@arm.linux.org.uk>,
Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH 1/3] Input: sysrq - drop tty argument from sysrq ops handlers
Date: Wed, 04 Aug 2010 07:03:27 -0500 [thread overview]
Message-ID: <4C59570F.7040201@windriver.com> (raw)
In-Reply-To: <1280910830.1902.144.camel@pasglop>
On 08/04/2010 03:33 AM, Benjamin Herrenschmidt wrote:
> On Wed, 2010-08-04 at 00:59 -0700, Dmitry Torokhov wrote:
>
>> Noone is using tty argument so let's get rid of it.
>>
>
> While talking about sysrq...
>
> I noticed that serial drivers call sysrq with the uart lock held.
>
>
The usb serial has the same kind of problem with all sorts of locks. I
had resorted to using a tasklet or workqueue to get the sysrq to execute
just outside the usb serial driver context. This work never made it
upstream because it was part of another series, but the reference is:
http://lkml.org/lkml/2010/3/9/17
For the standard serial you might be able to get away with dropping the
lock for the sysrq.
Did you have a particular way to trigger the problem or was it just
completely random, because I don't know that I have observed this
behavior with the typical 8250 driver.
Jason.
> I've seen deadlocks caused by that, for example, when entering the
> debugger, it waits forever for a CPU which is itself waiting on the UART
> lock.
>
> I have a patch to drop the lock in serial_core.h, I'll post that
> tomorrow hopefully, just checking if there's any objection there ? The
> serial drivers might need to be audited a bit to make sure they cope
> with the lock being dropped and re-acquired around the sysrq call.
>
> Cheers,
> Ben.
>
>
>
next prev parent reply other threads:[~2010-08-04 12:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 7:58 [PATCH 0/3] SysRq: do not pass tty argument around Dmitry Torokhov
2010-08-04 7:59 ` [PATCH 1/3] Input: sysrq - drop tty argument from sysrq ops handlers Dmitry Torokhov
2010-08-04 8:33 ` Benjamin Herrenschmidt
2010-08-04 9:09 ` Alan Cox
2010-08-05 1:59 ` Benjamin Herrenschmidt
2010-08-04 12:03 ` Jason Wessel [this message]
2010-08-05 2:03 ` Benjamin Herrenschmidt
2010-08-04 7:59 ` [PATCH 2/3] Input: sysrq - drop tty argument form handle_sysrq() Dmitry Torokhov
2010-08-04 11:25 ` Jason Wessel
2010-08-04 7:59 ` [PATCH 3/3] USB: drop tty argument from usb_serial_handle_sysrq_char() Dmitry Torokhov
2010-08-04 11:25 ` Jason Wessel
2010-08-04 9:11 ` [PATCH 0/3] SysRq: do not pass tty argument around Alan Cox
2010-08-04 19:44 ` Greg KH
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=4C59570F.7040201@windriver.com \
--to=jason.wessel@windriver.com \
--cc=airlied@linux.ie \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=fenghua.yu@intel.com \
--cc=gregkh@suse.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.com \
--cc=tony.luck@intel.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 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).