public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Toshikazu Nakayama <nakayama.ts@ncos.nec.co.jp>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk: fix discarding message when recursion_bug
Date: Fri, 19 Dec 2008 14:16:00 -0800	[thread overview]
Message-ID: <494C1D20.9000008@ct.jp.nec.com> (raw)
In-Reply-To: <20081219215347.GG2351@elte.hu>

Ingo Molnar wrote:
> * Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> wrote:
> 
>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>
>> Impact: fix
>>
>> When recursion_bug is true, kernel discards original message because printk_buf
>> contains recursion_bug_msg with NULL terminator. The sizeof(recursion_bug_msg)
>> makes this, use strlen() to get correct length without NULL terminator.
>>
>> Reported-by: Toshikazu Nakayama <nakayama.ts@ncos.nec.co.jp>
>> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>> ---
>>  kernel/printk.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Good one - applied to tip/core/printk, thanks!
> 
> Btw., i'm curious: in what situation was such recursion observed, and how 
> did the kernel behave? You saw a truncated recursion message in dmesg - or 
> was it worse?

I'm not sure about the real situation. I've heard this issue was found in
printing messages in NMI handler, maybe with artificial kernel stuck.

Thanks,
Hiroshi

  reply	other threads:[~2008-12-19 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19 18:23 [PATCH] printk: fix discarding message when recursion_bug Hiroshi Shimamoto
2008-12-19 21:53 ` Ingo Molnar
2008-12-19 22:16   ` Hiroshi Shimamoto [this message]
2008-12-19 22:35     ` Ingo Molnar

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=494C1D20.9000008@ct.jp.nec.com \
    --to=h-shimamoto@ct.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nakayama.ts@ncos.nec.co.jp \
    /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