From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Olaf Schnapper <os@de.ibm.com>
Subject: Re: [PATCH] Fix race/oops in tty layer after BKL pushdown
Date: Mon, 11 Aug 2008 08:59:20 +0100 [thread overview]
Message-ID: <20080811085920.59b278b9@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <200808071433.06885.borntraeger@de.ibm.com>
> Please review and consider to apply:
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> drivers/char/tty_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: kvm/drivers/char/tty_io.c
> ===================================================================
> --- kvm.orig/drivers/char/tty_io.c
> +++ kvm/drivers/char/tty_io.c
> @@ -1161,8 +1161,8 @@ void disassociate_ctty(int on_exit)
> tty = get_current_tty();
> if (tty) {
> tty_pgrp = get_pid(tty->pgrp);
> - mutex_unlock(&tty_mutex);
> lock_kernel();
> + mutex_unlock(&tty_mutex);
> /* XXX: here we race, there is nothing protecting tty */
> if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
> tty_vhangup(tty);
For upstream (see -next tree) I have pushed a refcounting solution (or at
least I hope its a solution) to the ttydev tree. For 2.6.26 your approach
partially fixes this and certainly doesn't make it worse so I'll now push
it onwards.
Alan
prev parent reply other threads:[~2008-08-11 8:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 12:33 Christian Borntraeger
2008-08-07 19:44 ` Alan Cox
2008-08-07 20:42 ` Christian Borntraeger
2008-08-11 7:59 ` Alan Cox [this message]
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=20080811085920.59b278b9@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=borntraeger@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=os@de.ibm.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
all inboxes | Powered by JetHome®