[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080811085920.59b278b9@lxorguk.ukuu.org.uk>
Date: Mon, 11 Aug 2008 08:59:20 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Olaf Schnapper <os@...ibm.com>
Subject: Re: [PATCH] Fix race/oops in tty layer after BKL pushdown
> Please review and consider to apply:
>
> Signed-off-by: Christian Borntraeger <borntraeger@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists