tty: Fix possible race in n_tty_read()
authorStanislav Kozina <skozina@redhat.com>
Thu, 9 Aug 2012 13:48:58 +0000 (14:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Aug 2012 20:13:11 +0000 (13:13 -0700)
commit00aaae033e323af33740e7012a8ba4b0fa6dce20
tree152d5cfb0186d2c4c5fadae2e79cf49d154be911
parent857196e2758f01ec40f93429013963ca5f22cbae
tty: Fix possible race in n_tty_read()

Fix possible panic caused by unlocked access to tty->read_cnt in
while-loop condition in n_tty_read().

Signed-off-by: Stanislav Kozina <skozina@redhat.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c