]> www.infradead.org Git - users/jedix/linux-maple.git/commit
TTY: pty, release tty in all ptmx_open fail paths
authorJiri Slaby <jslaby@suse.cz>
Wed, 12 Oct 2011 09:32:44 +0000 (11:32 +0200)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:42 +0000 (11:17 -0800)
commitc79f3bb74db53a368d0fea00068f610c13030042
tree66d28fc86e27569af638dbb7fcac964cce464db0
parent1d2f1a1414079d5dfc85ab63854fede558d16296
TTY: pty, release tty in all ptmx_open fail paths

commit 1177c0efc04d032644895b8d757f55b433912596 upstream.

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: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/pty.c