[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201110121523.05567.arnd@arndb.de>
Date: Wed, 12 Oct 2011 15:23:05 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jiri Slaby <jslaby@...e.cz>
Cc: gregkh@...e.de, linux-kernel@...r.kernel.org, jirislaby@...il.com,
stable@...nel.org, Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH 3/4] TTY: pty, release tty in all ptmx_open fail paths
On Wednesday 12 October 2011, Jiri Slaby wrote:
> Mistakenly, commit 64ba3dc3143d (tty: never hold BTM while getting
> tty_mutex) switched one fail path in ptmx_open to not free the newly
> allocated tty.
>
> Fix that by jumping to the appropriate place. And rename the labels so
> that it's clear what is going on there.
>
> Introduced-in: v2.6.36-rc2
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Cc: stable@...nel.org
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Alan Cox <alan@...rguk.ukuu.org.uk>
> Cc: Greg Kroah-Hartman <gregkh@...e.de>
Ok, I have checked that this patch returns the code into the state
before my broken patch, that looks good.
I think I made the same mistake trying to understand your patch
that I made originally when I introduced the bug, which was to
confuse the lifetime of the pty master with the lifetime of the
slave device, so I thought that tty_release should not be called
if we never called ptm_driver->ops->open(), but that's actually
a different device.
Arnd
--
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