From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
jirislaby@gmail.com
Subject: Re: [PATCH v2 1/1] Char: tty, fix tty_port_block_til_ready waiting
Date: Tue, 23 Jun 2009 16:30:06 -0700 [thread overview]
Message-ID: <20090623163006.f05b75ee.akpm@linux-foundation.org> (raw)
In-Reply-To: <1245311173-1197-1-git-send-email-jirislaby@gmail.com>
On Thu, 18 Jun 2009 09:46:13 +0200
Jiri Slaby <jirislaby@gmail.com> wrote:
> Use DEFINE_WAIT instead DECLARE_WAITQUEUE, because we use
> prepare/finish_wait since commit
> 3e3b5c087799e536871c8261b05bc28e4783c8da
> (tty: use prepare/finish_wait)
>
> Otherwise we would oops in finish_wait.
>
<scratches head for a while>
OK, here's a better changelog:
Since commit 3e3b5c087799e536871c8261b05bc28e4783c8da ("tty: use
prepare/finish_wait"), tty_port_block_til_ready() is using
prepare_to_wait()/finish_wait(). Those functions require that
the wait_queue_t be initialised with .func=autoremove_wake_function,
via DEFINE_WAIT().
But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was
not made, so this code will oops in finish_wait().
>
> diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
> index 62dadfc..4e862a7 100644
> --- a/drivers/char/tty_port.c
> +++ b/drivers/char/tty_port.c
> @@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
> {
> int do_clocal = 0, retval;
> unsigned long flags;
> - DECLARE_WAITQUEUE(wait, current);
> + DEFINE_WAIT(wait);
> int cd;
>
> /* block if port is in the process of being closed */
Why is nobody reporting the oopses?
next prev parent reply other threads:[~2009-06-23 23:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 7:46 [PATCH v2 1/1] Char: tty, fix tty_port_block_til_ready waiting Jiri Slaby
2009-06-23 23:30 ` Andrew Morton [this message]
2009-06-24 11:41 ` Jiri Slaby
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=20090623163006.f05b75ee.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@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