On Sun, 04 Jun 2017 13:34:31 +0200 Mike Galbraith <efa...@gmx.de> wrote:
> On Sun, 2017-06-04 at 12:00 +0200, Vegard Nossum wrote: > > > > I don't know how you did it, but this passes my testing (reproducers for > > both the original issue and the lockdep splat/hang). > > I suppose I can sign it off, see if that inspires anyone to come up > with something better. > > drivers/tty: Fix 925bb1ce47f4 circular locking dependency This is still completely broken and has the same underlying flaw as the original. The tty->atomic_write_lock is solely meant to enforce the ordering of a write() syscall. It can be held for an indefinite amount of time (it's sometimes multiple seconds in normal flow). Your patch effectively breaks full duplex support on the serial layer because the internal buffering is designed to cope with tens of millisecond delays. If the receiver is multithreaded as is normal then it's also going to wreck the throughput. We can't defer receive processing indefintiely for transmit processing, that isn't how RS232 works. If it needs a spinlock putting back to protect those tty fields then so be it. NAK Alan