]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: fix missing locking on fifo in write callback
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Mar 2010 22:00:43 +0000 (23:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:33 +0000 (13:21 -0700)
commit12308947b408647889b62ece8bedcc6fabd706c4
treed64c9e367ba2aef9cd2325aa2304edd47fc39eff
parent625993475f5960fc6baa2ee6a6a02031e94574d2
USB: serial: fix missing locking on fifo in write callback

On errors the fifo was reset without any locking. This could race with
write which do kfifo_put and perhaps also chars_in_buffer and write_room.

Every other access to the fifo is protected using the port lock so
better add it to the error path as well.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/generic.c