[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1491462988.4166.104.camel@kernel.crashing.org>
Date: Thu, 06 Apr 2017 17:16:28 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Michael Neuling <mikey@...ling.org>,
Al Viro <viro@...IV.linux.org.uk>,
johan Hovold <johan@...nel.org>,
Peter Hurley <peter@...leysoftware.com>,
Wang YanQing <udknight@...il.com>,
Alexander Popov <alex.popov@...ux.com>,
Rob Herring <robh@...nel.org>
Cc: Mikulas Patocka <mpatocka@...hat.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: tty crash in tty_ldisc_receive_buf()
On Thu, 2017-04-06 at 17:04 +1000, Michael Neuling wrote:
> We see this usually on boot but can also see it if we kill a getty attached to
> tty (which is then respawned by systemd). It seems like we are flushing data to
> a tty at the same time as it's being torn down and restarted.
>
> I did try the below patch which avoids the crash but locks up one of the CPUs. I
> guess the data never gets flushed if we say nothing is processed.
>
> This is on powerpc but has also been reported by parisc.
>
> I'm not at all familiar with the tty layer and looking at the locks, mutexes,
> semaphores and reference counting in there scares the hell out of me.
>
> If anyone has an idea, I'm happy to try a patch.
Note that we noticed one path that called reinit without the ldisc lock
held for writing, we added that, but it didn't fix the problem.
Cheers,
Ben.
Powered by blists - more mailing lists