]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Ensure single-threaded flip buffer consumer with mutex
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:36:10 +0000 (09:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:47:09 +0000 (16:47 -0700)
commite4d100eb2b1156f2a465dd281b4a0dae95b335e3
tree6c90bac37cfe6843b4e78cb9280aa10524da351d
parent07fc0469e0f9418cd36f319b8bfec817ab2d6a24
tty: Ensure single-threaded flip buffer consumer with mutex

The buffer work may race with parallel tty_buffer_flush. Use a
mutex to guarantee exclusive modify access to the head flip
buffer.

Remove the unneeded spin lock.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgrp/dgrp_tty.c
drivers/tty/tty_buffer.c
include/linux/tty.h