]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Protect minimum_to_wake reset for concurrent readers
authorPeter Hurley <peter@hurleysoftware.com>
Thu, 7 Nov 2013 19:01:57 +0000 (14:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2013 17:17:49 +0000 (09:17 -0800)
commit8388f962be91428238d4e0f050d18652a94d6d2a
treeeeba9a7cacf8a5a14500af01eaf626839655a480
parent7ffb2a72f6ca676271e67d988de14fc484e1e542
n_tty: Protect minimum_to_wake reset for concurrent readers

With multiple, concurrent readers (each waiting to acquire the
atomic_read_lock mutex), a departing reader may mistakenly reset
minimum_to_wake after a new reader has already set a new value.

Protect the minimum_to_wake reset with the atomic_read_lock critical
section.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c