From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Zhang Subject: [PATCH -rt] printk: Don't emit console_cpu_notify() for CPU_DYING Date: Wed, 16 Nov 2011 17:42:19 +0800 Message-ID: <20111116094219.GA9281@zhy> Reply-To: Yong Zhang Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: LKML , linux-rt-users To: Thomas Gleixner Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:42906 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755299Ab1KPJm3 (ORCPT ); Wed, 16 Nov 2011 04:42:29 -0500 Content-Disposition: inline Sender: linux-rt-users-owner@vger.kernel.org List-ID: Otherwise we will get below warning: BUG: sleeping function called from invalid context at /build/linux/kernel/rtmutex.c:645 in_atomic(): 1, irqs_disabled(): 1, pid: 1054, name: migration/9 no locks held by migration/9/1054. irq event stamp: 36 hardirqs last enabled at (35): [] _raw_spin_unlock_irq+0x30/0x70 hardirqs last disabled at (36): [] stop_machine_cpu_stop+0x8f/0x110 softirqs last enabled at (0): [] copy_process+0x6d3/0x1640 softirqs last disabled at (0): [< (null)>] (null) Pid: 1054, comm: migration/9 Not tainted 3.2.0-rc1-rt2-11312-gbf51260-dirty #12 Call Trace: [] __might_sleep+0x12e/0x1e0 [] rt_spin_lock+0x24/0x60 [] ? touch_nmi_watchdog+0x42/0x80 [] serial8250_console_write+0x143/0x150 [] __call_console_drivers+0x93/0xb0 [] _call_console_drivers+0x4c/0x80 [] console_unlock+0xcd/0x240 [] console_cpu_notify+0x26/0x2d [] notifier_call_chain+0x84/0xf0 [] __raw_notifier_call_chain+0xe/0x10 [] __cpu_notify+0x20/0x40 [] take_cpu_down+0x32/0x40 [] stop_machine_cpu_stop+0xaa/0x110 [] ? stop_one_cpu+0x80/0x80 [] ? stop_one_cpu+0x80/0x80 [] cpu_stopper_thread+0xce/0x1b0 [] ? wait_for_stop_done+0xa0/0xa0 [] ? wait_for_stop_done+0xa0/0xa0 [] ? sub_preempt_count+0xa9/0xe0 [] ? wait_for_stop_done+0xa0/0xa0 [] ? wait_for_stop_done+0xa0/0xa0 [] kthread+0xa6/0xb0 [] ? sub_preempt_count+0xa9/0xe0 [] ? _raw_spin_unlock_irq+0x3b/0x70 [] kernel_thread_helper+0x4/0x10 [] ? finish_task_switch+0x8c/0x110 [] ? _raw_spin_unlock_irq+0x3b/0x70 [] ? retint_restore_args+0xe/0xe [] ? kthreadd+0x160/0x160 [] ? gs_change+0xb/0xb CPU 9 is now offline Signed-off-by: Yong Zhang --- kernel/printk.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/kernel/printk.c b/kernel/printk.c index 535bc3b..ba0393e 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1223,7 +1223,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, switch (action) { case CPU_ONLINE: case CPU_DEAD: - case CPU_DYING: case CPU_DOWN_FAILED: case CPU_UP_CANCELED: console_lock(); -- 1.7.5.4