From: Arnd Bergmann <arnd@arndb.de>
To: Luotao Fu <l.fu@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: Problem with tty changes in linux-next
Date: Tue, 6 Jul 2010 16:23:48 +0200 [thread overview]
Message-ID: <201007061623.48363.arnd@arndb.de> (raw)
In-Reply-To: <20100706130403.GD3991@pengutronix.de>
On Tuesday 06 July 2010, Luotao Fu wrote:
> I just tried to get latest linux-next (HEAD=288092896e2097eebee7d4bf1df9a0c7b550e225)
> run on my ARM system (a PXA270 base PCM990 board. The board maps its console to its
> ttyS0. During the tests I experienced two problems with the new shiny bkl-free
> tty stuff:
Sorry about the warning, I have been aware of this for some time but have
not yet pushed the fix into -next because of other dependencies.
The fix is the first patch in the 'config' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl.git
It would probably be best if either Stephen pulls that branch into -next
or Frederic includes it in his tree that is already getting pulled in.
> Indeed the bkl is held by kernel_init, so we will kind of _always_ run
> into this. Seemed that the tty_lock stuff was reworked in
> 4a179218b78d346e0de37c6d428d5be01fadae9c by Arnd. I'd say that the
> check of a holding lock in non-tty_mutex system should be changed here,
> probably exclusive check for tty locks.
The check is only there for CONFIG_TTY_MUTEX=n, otherwise you get the
same information from lockdep. The warning is useful in general
because when it gets triggered this normally means that running with
CONFIG_TTY_MUTEX disabled would be broken.
The particular case of holding the lock from the init code is
a false positive though, because the init code does not get
converted to the tty mutex and in fact the patch referenced above
makes the init code BKL-free as well, which is the intended fix.
> 2. A more serious problem is that printing kernel message no more works
> after running into userspace.
> ....
> Freeing init memory: 100K
> 3sy||_|_|
> phyCORE login:
> ....
> The boot message between init and login sheel is printed only
> partly. The cursor jumps back and forward. It seems that part the
> special characters like new line etc. are cutted away so that the
> printout is shown in such a funny manner. After a tty is spawned, every
> thing works just well. I can log in onto the system and it seems to work
> so far. I bisected the kernel and identified eventually
> fb11bee14186af87ee6abb833cf1a2a6be59c65b as the
> first bad commit. The actual problem should be, however,
> 36c621d82b956ff6ff72273f848af53e6c581aba, where tty_port_block_til_ready()
> is introduced. Seems to me that there are locking problems. I
> unfortunately don't have any insights of tty layer to tell where the
> exact problem is.
I'm sorry you had to bisect this. I did the same bisect and already
submitted a patch for this, which probably got stuck in Greg's inbox
while he was preparing the stable releases. I can't find the patch
in the archives now, which could also mean that it never left my local
machine.
I have the patch on a different machine, but will resend it to Greg
when I get there to make sure it doesn't get lost.
Arnd
next prev parent reply other threads:[~2010-07-06 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 13:04 Problem with tty changes in linux-next Luotao Fu
2010-07-06 14:23 ` Arnd Bergmann [this message]
2010-07-06 14:40 ` Ilya Dryomov
2010-07-06 15:14 ` Greg KH
2010-07-06 15:35 ` Arnd Bergmann
2010-07-06 15:48 ` Luotao Fu
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=201007061623.48363.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@linux.intel.com \
--cc=fweisbec@gmail.com \
--cc=gregkh@suse.de \
--cc=l.fu@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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