linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hillf Danton <dhillf@gmail.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>, Jan Kara <jack@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [console_unlock] WARNING: at kernel/sched/clock.c:219 sched_clock_cpu()
Date: Fri, 8 Feb 2013 12:52:16 +0800	[thread overview]
Message-ID: <CAJd=RBBtzcjyzxMFUHQL+9srV-juvqc9gLFFMOx50kPv9tVtBQ@mail.gmail.com> (raw)
In-Reply-To: <20130208020659.GE5224@localhost>

Hello Fengguang

On Fri, Feb 8, 2013 at 10:06 AM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> [    0.000000] Console: colour VGA+ 80x25
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] WARNING: at /c/kernel-tests/src/linux/kernel/sched/clock.c:219 sched_clock_cpu+0x65/0x140()
> [    0.000000] Hardware name: Bochs
> [    0.000000] Modules linked in:
> [    0.000000] Pid: 0, comm: swapper Not tainted 3.8.0-rc6-mm1-00539-g83b324c #39
> [    0.000000] Call Trace:
> [    0.000000]  [<c102ba37>] warn_slowpath_common+0x87/0xb0
> [    0.000000]  [<c1063025>] ? sched_clock_cpu+0x65/0x140
> [    0.000000]  [<c1063025>] ? sched_clock_cpu+0x65/0x140
> [    0.000000]  [<c102ba82>] warn_slowpath_null+0x22/0x30
> [    0.000000]  [<c1063025>] sched_clock_cpu+0x65/0x140
> [    0.000000]  [<c102d8f9>] __console_unlock+0x39/0x490
> [    0.000000]  [<c12eeb23>] ? printk+0x3d/0x3f
> [    0.000000]  [<c102dd5d>] console_unlock+0xd/0x20
> [    0.000000]  [<c14bbbb0>] con_init+0x1fb/0x20e
> [    0.000000]  [<c14bb1b2>] console_init+0x12/0x20
> [    0.000000]  [<c149e969>] start_kernel+0x258/0x35f
> [    0.000000]  [<c149e4cc>] ? repair_env_string+0x51/0x51
> [    0.000000]  [<c149e376>] i386_start_kernel+0x12c/0x12f
> [    0.000000] ---[ end trace e006f8c3d589c9a1 ]---
>
Can you please try the following fix?

--- a/kernel/printk.c	Fri Feb  8 12:31:18 2013
+++ b/kernel/printk.c	Fri Feb  8 12:51:42 2013
@@ -2053,6 +2053,7 @@ static bool __console_unlock(void)
 		return false;
 	}

+	local_irq_save(flags);
 	console_may_schedule = 0;
 	cur_cpu = smp_processor_id();
 	/*
@@ -2062,6 +2063,7 @@ static bool __console_unlock(void)
 	end_time = sched_clock_cpu(cur_cpu) +
 				max_interrupt_disabled_duration() / 2;

+	local_irq_restore(flags);
 	/* flush buffered message fragment immediately to console */
 	console_cont_flush(text, sizeof(text));
 again:
--

  reply	other threads:[~2013-02-08  4:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08  2:06 [console_unlock] WARNING: at kernel/sched/clock.c:219 sched_clock_cpu() Fengguang Wu
2013-02-08  4:52 ` Hillf Danton [this message]
2013-02-08 13:23 ` Jan Kara

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='CAJd=RBBtzcjyzxMFUHQL+9srV-juvqc9gLFFMOx50kPv9tVtBQ@mail.gmail.com' \
    --to=dhillf@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).