From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: taoyuhong <taoyuhong@huawei.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jslaby@suse.com" <jslaby@suse.com>,
Zhaoshenglong <zhaoshenglong@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: fix flush_to_ldisc() oops before tty_open is done
Date: Thu, 26 Oct 2017 15:31:55 +0100 [thread overview]
Message-ID: <20171026153155.70c92343@alans-desktop> (raw)
In-Reply-To: <5D766B1447A5304684CEC38F253A9297415D8B6F@DGGEMA503-MBX.china.huawei.com>
> I can reproduce this problem on CentOS now. It seems better to leave this problem to drivers, not the user process.
> Do you think we should examine serial drivers of ARM, like pl011?
Can you reproduce it on real hardware - I ask because the driver has been
around for years without reports and it would be good to know it's not a
virtual platform problem you are chasing.
> ---------------------------------------------------------------------------------------
> Does it means this serial driver do not support activate/deactive? Is that out of date?
> Because tty driver is complex, I am studying the concept and source code, and need time to find a good solution.
AMBA uses the uart layer. So uart does a lot of the work.
Yes the driver is complex and the core hangup/receive paths are tricky to
understand. The open path however is fairly simple so the fact you see a
failure there makes me suspicious and I tink that is the first one to
trace because the tty_open paths do not set port->tty until the tty is
initialized properly.
The hangup path is complex and has a history of bugs and races so is a
bit less surprising.
The important detail here is that both the queueing of data and the
hangup are done by schedule_work() and as far as I can see (the code
has changed somewhat since I last dug into that bit) rely on that to avoid
the two executing at the same time.
Alan
next prev parent reply other threads:[~2017-10-26 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 2:15 taoyuhong
2017-10-25 7:00 ` Greg KH
[not found] ` <5D766B1447A5304684CEC38F253A9297415D8B47@DGGEMA503-MBX.china.huawei.com>
2017-10-27 8:52 ` 答复: " Greg KH
2017-10-27 9:57 ` 答复: " taoyuhong
2017-10-25 19:25 ` Alan Cox
[not found] ` <5D766B1447A5304684CEC38F253A9297415D8B6F@DGGEMA503-MBX.china.huawei.com>
2017-10-26 14:31 ` Alan Cox [this message]
[not found] ` <5D766B1447A5304684CEC38F253A92974180F3A2@DGGEMA503-MBX.china.huawei.com>
2017-11-03 14:37 ` 答复: " gregkh
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=20171026153155.70c92343@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=taoyuhong@huawei.com \
--cc=zhaoshenglong@huawei.com \
/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
Powered by JetHome