From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: Race condition in TTY ldisc layer in 2.6.33
Date: Thu, 11 Mar 2010 17:06:53 +0100 [thread overview]
Message-ID: <20100311160653.GA30832@rere.qmqm.pl> (raw)
In-Reply-To: <20100311155015.GA25607@rere.qmqm.pl>
On Thu, Mar 11, 2010 at 04:50:15PM +0100, Michał Mirosław wrote:
> On Thu, Mar 11, 2010 at 05:50:09AM -0800, Greg KH wrote:
> > On Thu, Mar 11, 2010 at 02:32:22PM +0100, Micha? Miros?aw wrote:
> > > Looks like there's some race contition in switching ldiscs on USB serial
> > > ports. The following warnings trigger sometimes after killing and restarting
> > > process that changes ldisc and waits forever. In case you want to look at
> > > the code, there it is: http://rere.qmqm.pl/~mirq/sermmc/
> > If you apply git commit 638b9648ab51c9c549ff5735d3de519ef6199df3 to the
> > 2.6.33 kernel, does it solve the issue for you?
> I'm running with the patch now. After couple cycles of starting and killing
> the ldisc-setting process I get no warnings. I'll get back to you when/if
> I encounter them again.
Hah. Just seconds after I sent that mail I hit this again. The stack traces
are exactly the same (except for different starting address of
flush_to_ldisc()).
The warnings are triggered by:
struct usb_serial_port *port = tty->driver_data;
...
/* count is managed under the mutex lock for the tty so cannot
drop to zero until after the last close completes */
WARN_ON(!port->port.count);
BTW, Couple of minutes earlier I got this message:
[ 201.629616] cp210x ttyUSB0: usb_serial_generic_resubmit_read_urb - failed resubmitting read urb, error -1
But after that I disconnected and reconnected the device, so this is probably
not relevant here.
Best Regards,
Michał Mirosław
next prev parent reply other threads:[~2010-03-11 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 13:32 Michał Mirosław
2010-03-11 13:50 ` Greg KH
2010-03-11 15:50 ` Michał Mirosław
2010-03-11 16:06 ` Michał Mirosław [this message]
2010-03-11 16:21 ` Alan Stern
2010-03-11 16:29 ` Johan Hovold
2010-03-11 17:02 ` Michał Mirosław
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=20100311160653.GA30832@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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®