Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761419AbYARO4S (ORCPT ); Fri, 18 Jan 2008 09:56:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756961AbYARO4H (ORCPT ); Fri, 18 Jan 2008 09:56:07 -0500 Received: from gecko.sbs.de ([194.138.37.40]:24327 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756933AbYARO4G (ORCPT ); Fri, 18 Jan 2008 09:56:06 -0500 Message-ID: <4790BDD1.40808@siemens.com> Date: Fri, 18 Jan 2008 15:55:13 +0100 From: Jan Kiszka User-Agent: Thunderbird 2.0.0.9 (X11/20070801) MIME-Version: 1.0 To: Steven Rostedt CC: Jiri Kosina , LKML , Linus Torvalds , Andrew Morton , Alexey Dobriyan , Kirill Korotaev Subject: Re: [PATCH] printk deadlocks if called with runqueue lock held References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 28 Steven Rostedt wrote: ... > @@ -978,7 +980,13 @@ void release_console_sem(void) > console_locked = 0; > up(&console_sem); Hmm, just looking at this fragment: Doesn't up() include the risk of running onto the runqueue lock as well? > spin_unlock_irqrestore(&logbuf_lock, flags); > - if (wake_klogd) > + /* > + * If we try to wake up klogd while printing with the runqueue lock > + * held, this will deadlock. We don't have access to the runqueue > + * lock from here, but just checking for interrupts disabled > + * should be enough. > + */ > + if (!irqs_disabled() && wake_klogd) > wake_up_klogd(); > } > EXPORT_SYMBOL(release_console_sem); Jan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/