From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Aubrey Li <aubreylee@gmail.com>
Cc: Alan <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [BUG]: 2.6.19.2: Weird serial core issue
Date: Thu, 1 Feb 2007 19:09:19 +0000 [thread overview]
Message-ID: <20070201190919.GA18642@flint.arm.linux.org.uk> (raw)
In-Reply-To: <6d6a94c50702010954g7cb769y8cba30fbad658984@mail.gmail.com>
On Fri, Feb 02, 2007 at 01:54:23AM +0800, Aubrey Li wrote:
> On 2/1/07, Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> >serial core does not and should not "record" the terminal settings.
> >That's the job of the tty layer.
>
> OK, if tty layer save the new terminal settings to an old one properly,
> How could this happen?
I don't understand that comment.
> >No. You haven't analysed the call path causing tty_ioctl() to be
> >invoked, so you have no basis to point the finger *anywhere* at the
> >moment.
> >
> >Find out from where tty_ioctl() is called - maybe by adding a call
> >to dump_stack(). I think you'll find it is coming from userspace.
> >
>
> If I recall correctly, the call path is as follows:
>
> sys_ioctl->vfs_ioctl->do_ioctl->tty_ioctl->n_tty_ioctl->set_termios,
And here is the proof that it's *userspace* which is effecting this change.
If "sys_ioctl" is the very first function in the list then that's a result
of some userspace process issuing an ioctl.
> Yes, from the back trace stack, it appears to come from userspace. But
> I didn't startup any application. If there should be one, I think it's
> shell.
Shells typically alter the termios settings - eg, to turn off echo while
they're waiting for command input. When command input has finished (by
pressing the enter key) they typically turn it back on.
Changing the termios settings while the shell is waiting for input is not
something they expect to happen, and this is the kind of behaviour I'd
expect in this scenario.
> I can't believe it's caused by the userspace, I'll go further to find
> the root cause.
Ho hum. Guess you're in for a long investigation then. 8/
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2007-02-01 19:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 10:49 [BUG]: 2.6.19.2: Weird serial core issue Aubrey Li
2007-01-31 16:21 ` Alan
2007-02-01 2:33 ` Aubrey Li
2007-02-01 9:45 ` Russell King
2007-02-01 10:09 ` Aubrey Li
2007-02-01 11:16 ` Russell King
2007-02-01 17:54 ` Aubrey Li
2007-02-01 19:09 ` Russell King [this message]
[not found] ` <000201c745d9$4577fe20$2e01a8c0@acksys.local>
2007-02-01 10:38 ` Aubrey Li
2007-02-01 15:19 ` Paul Fulghum
2007-02-01 12:02 ` Alan
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=20070201190919.GA18642@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=aubreylee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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