diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2017-03-04 13:46:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 14:07:10 +0900 |
commit | a4a3e061149f09c075f108b6f1cf04d9739a6bc2 (patch) | |
tree | 1539f1e567023aeda89d8ea8af68d885d6b8f7dd /sound/isa/adlib.c | |
parent | 5362544bebe85071188dd9e479b5a5040841c895 (diff) | |
download | blackbird-op-linux-a4a3e061149f09c075f108b6f1cf04d9739a6bc2.tar.gz blackbird-op-linux-a4a3e061149f09c075f108b6f1cf04d9739a6bc2.zip |
tty: fix data race in tty_ldisc_ref_wait()
tty_ldisc_ref_wait() checks tty->ldisc under tty->ldisc_sem.
But if ldisc==NULL it releases them sem and reloads
tty->ldisc without holding the sem. This is wrong and
can lead to returning non-NULL ldisc without protection.
Don't reload tty->ldisc second time.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Cc: syzkaller@googlegroups.com
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/isa/adlib.c')
0 files changed, 0 insertions, 0 deletions