From: Andrew Morton <akpm@zip.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-kernel@vger.kernel.org
Subject: Re: [BUG] mysterious tty deadlock
Date: Wed, 28 Aug 2002 17:05:44 -0700 [thread overview]
Message-ID: <3D6D6558.B2CE77B6@zip.com.au> (raw)
In-Reply-To: 20020829002103.B28455@flint.arm.linux.org.uk
Russell King wrote:
>
> ...
> > --- 2.5.32/drivers/serial/core.c~serial-race Wed Aug 28 15:22:22 2002
> > +++ 2.5.32-akpm/drivers/serial/core.c Wed Aug 28 15:22:26 2002
> > @@ -1315,13 +1315,14 @@ static void uart_wait_until_sent(struct
> > * 'timeout' / 'expire' give us the maximum amount of time
> > * we wait.
> > */
> > + set_current_state(TASK_INTERRUPTIBLE);
> > while (!port->ops->tx_empty(port)) {
> > - set_current_state(TASK_INTERRUPTIBLE);
> > schedule_timeout(char_time);
> > if (signal_pending(current))
> > break;
> > if (time_after(jiffies, expire))
> > break;
> > + set_current_state(TASK_INTERRUPTIBLE);
> > }
> > set_current_state(TASK_RUNNING); /* might not be needed */
> > }
>
> Patch looks good, as far as correctness goes. However, since char_time
> will be the amount of time for one character, we should never sleep long
> enough for the user to notice this slip-up.
>
> If people are seeing deadlocks, I agree with wli that there's something
> very wrong elsewhere.
Well Bill's trace is claiming that we're doing a schedule_timeout(0x7fffffff)
for some reason.
But yes, he seems to be able to hit it too frequently for this to be
the cause.
next prev parent reply other threads:[~2002-08-28 23:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-28 22:01 [BUG] mysterious tty deadlock William Lee Irwin III
2002-08-28 22:25 ` Andrew Morton
2002-08-28 23:21 ` Russell King
2002-08-29 0:05 ` Andrew Morton [this message]
2002-08-29 0:20 ` Russell King
2002-09-01 2:42 ` William Lee Irwin III
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=3D6D6558.B2CE77B6@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.