Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH 3/4] TTY: pty, release tty in all ptmx_open fail paths | Date | Wed, 12 Oct 2011 15:23:05 +0200 |
| |
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@suse.cz> > Cc: stable@kernel.org > Cc: Arnd Bergmann <arnd@arndb.de> > Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> > Cc: Greg Kroah-Hartman <gregkh@suse.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
| |