From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Neuling <mikey@neuling.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
johan Hovold <johan@kernel.org>,
Peter Hurley <peter@hurleysoftware.com>,
Wang YanQing <udknight@gmail.com>,
Alexander Popov <alex.popov@linux.com>,
Rob Herring <robh@kernel.org>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
Dmitry Vyukov <dvyukov@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: tty crash in tty_ldisc_receive_buf()
Date: Thu, 06 Apr 2017 17:16:28 +1000 [thread overview]
Message-ID: <1491462988.4166.104.camel@kernel.crashing.org> (raw)
In-Reply-To: <1491462281.2815.47.camel@neuling.org>
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.
next prev parent reply other threads:[~2017-04-06 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 7:04 tty crash in tty_ldisc_receive_buf() Michael Neuling
2017-04-06 7:16 ` Benjamin Herrenschmidt [this message]
2017-04-06 13:28 ` Rob Herring
2017-04-07 0:47 ` Michael Neuling
2017-04-07 1:03 ` Benjamin Herrenschmidt
2017-04-07 14:03 ` Rob Herring
2017-04-07 23:21 ` Benjamin Herrenschmidt
2017-04-07 1:24 ` Wang YanQing
2017-04-07 2:06 ` Michael Neuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491462988.4166.104.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=alex.popov@linux.com \
--cc=dvyukov@google.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikey@neuling.org \
--cc=mpatocka@redhat.com \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
--cc=udknight@gmail.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).