Re: [patch] tty: fix port buffer locking V2

2017-06-05 Thread Mike Galbraith
On Mon, 2017-06-05 at 08:48 +0200, Greg Kroah-Hartman wrote: > > Can you redo this against 4.12-rc4 which has the original tty locking > patch reverted? It's against 4.12-rc4. -Mike

Re: [patch] tty: fix port buffer locking V2

2017-06-04 Thread Greg Kroah-Hartman
On Mon, Jun 05, 2017 at 06:52:27AM +0200, Mike Galbraith wrote: > This is just in case.  While it works, I consider it to be diagnostic > data for those unfortunate enough to be intimate with tty locking :) Can you redo this against 4.12-rc4 which has the original tty locking patch reverted? than

[patch] tty: fix port buffer locking V2

2017-06-04 Thread Mike Galbraith
This is just in case.  While it works, I consider it to be diagnostic data for those unfortunate enough to be intimate with tty locking :) --- V1 (925bb1ce47f4) changelog: tty_insert_flip_string_fixed_flag() is racy against itself when called from the ioctl(TCXONC, TCION/TCIOFF) path [1] and the f

[PATCH] tty: fix port buffer locking

2017-05-11 Thread Vegard Nossum
tty_insert_flip_string_fixed_flag() is racy against itself when called from the ioctl(TCXONC, TCION/TCIOFF) path [1] and the flush_to_ldisc() workqueue path [2]. The problem is that port->buf.tail->used is modified without consistent locking; the ioctl path takes tty->atomic_write_lock, whereas th