Hello Fengguang

On Fri, Feb 8, 2013 at 10:06 AM, Fengguang Wu <fengguang...@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:
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to