From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] logbuff: Prevent an infinite loop for console output
Date: Fri, 07 May 2010 10:23:56 +0200 [thread overview]
Message-ID: <m2vdb0azmr.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1273192322-9548-1-git-send-email-ptyser@xes-inc.com> (Peter Tyser's message of "Thu, 6 May 2010 19:32:02 -0500")
Hi Peter,
> When using 'logbuff' as stdout and the console loglevel is greater
> than a message's loglevel it is supposed to be both logged, and printed
> to the console. The logbuff_printk() function is responsible for both
> logging and displaying the message. However, logbuff_printk()
> previously used printf() to print the message to the console. The
> printf() call would eventually end up back in logbuff_printk(), and
> an infinite loop would occur which would hang a board.
>
> Using serial_puts() instead of printf() in logbuff_printk() avoids the
> recursion and resolves the issue.
>
> Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
> Reported-by: Dennis Ruffer <daruffer@gmail.com>
Hm. What if a board has "stdout" set to "lcd" or "nc" or any other
device? Do we really want the text to be output on the serial console
then? Doesn't this break the whole "stdout" concept?
Cheers
Detlev
--
Some people unfortunately like jumping up and down about spaces but not code.
[...] I'd rather read good poetry written in very bad hand writing than bad
poetry written in beautiful handwriting, and I think the same is true of code.
-- Alan Cox <20090701130018.115ce0ea@lxorguk.ukuu.org.uk>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2010-05-07 8:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 0:32 [U-Boot] [PATCH] logbuff: Prevent an infinite loop for console output Peter Tyser
2010-05-07 8:23 ` Detlev Zundel [this message]
2010-05-07 17:34 ` Peter Tyser
2010-06-08 21:47 ` Wolfgang Denk
2010-06-08 21:58 ` Peter Tyser
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=m2vdb0azmr.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/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