From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193AbaBRX3v (ORCPT ); Tue, 18 Feb 2014 18:29:51 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50833 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752708AbaBRWqP (ORCPT ); Tue, 18 Feb 2014 17:46:15 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Paul E. McKenney" , "Srivatsa S. Bhat" , Linus Torvalds , Guillaume Morin Subject: [PATCH 3.4 05/24] printk: Fix scheduling-while-atomic problem in console_cpu_notify() Date: Tue, 18 Feb 2014 14:46:52 -0800 Message-Id: <20140218224550.376307762@linuxfoundation.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <20140218224550.221535225@linuxfoundation.org> References: <20140218224550.221535225@linuxfoundation.org> User-Agent: quilt/0.61-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Paul E. McKenney" commit 85eae82a0855d49852b87deac8653e4ebc8b291f upstream. The console_cpu_notify() function runs with interrupts disabled in the CPU_DYING case. It therefore cannot block, for example, as will happen when it calls console_lock(). Therefore, remove the CPU_DYING leg of the switch statement to avoid this problem. Signed-off-by: Paul E. McKenney Reviewed-by: Srivatsa S. Bhat Signed-off-by: Linus Torvalds Cc: Guillaume Morin Signed-off-by: Greg Kroah-Hartman --- kernel/printk.c | 1 - 1 file changed, 1 deletion(-) --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1172,7 +1172,6 @@ static int __cpuinit console_cpu_notify( switch (action) { case CPU_ONLINE: case CPU_DEAD: - case CPU_DYING: case CPU_DOWN_FAILED: case CPU_UP_CANCELED: console_lock();