From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input - keyboard: fix theoretical race on vt switch
Date: Sat, 5 Sep 2009 00:09:17 -0700 [thread overview]
Message-ID: <20090905074222.122C8526EC9@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <4A9FE929.8030804@tuffmail.co.uk>
On Thu, Sep 03, 2009 at 05:04:57PM +0100, Alan Jenkins wrote:
> Switching virtual consoles could change fg_console between
>
> vc = vc_cons[fg_console].d
> and
> kbd = kbd_table + fg_console
>
> Replace the second instance of fg_console with vc->vc_num.
>
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> ---
> drivers/char/keyboard.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
> index 737be95..4b564c5 100644
> --- a/drivers/char/keyboard.c
> +++ b/drivers/char/keyboard.c
> @@ -1157,7 +1157,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
> tty->driver_data = vc;
> }
>
> - kbd = kbd_table + fg_console;
> + kbd = kbd_table + vc->vc_num;
Hmm, I see more such cases there...
--
Dmitry
next prev parent reply other threads:[~2009-09-05 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 16:04 [PATCH] Input - keyboard: fix theoretical race on vt switch Alan Jenkins
2009-09-05 7:09 ` Dmitry Torokhov [this message]
2009-09-05 14:16 ` [PATCHv2] " Alan Jenkins
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=20090905074222.122C8526EC9@mailhub.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).