From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757239Ab1LWNoa (ORCPT ); Fri, 23 Dec 2011 08:44:30 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:48002 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757186Ab1LWNo2 (ORCPT ); Fri, 23 Dec 2011 08:44:28 -0500 Date: Fri, 23 Dec 2011 14:42:25 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Dave Jones , Linux Kernel , Mike Galbraith , Linus Torvalds , Dave Airlie , Andrew Morton Subject: Re: [rfc] disable scheduler warnings during oopses. Message-ID: <20111223134225.GA21382@elte.hu> References: <20111222213929.GA4722@redhat.com> <20111223101917.GA4749@elte.hu> <1324641960.24803.50.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1324641960.24803.50.camel@twins> User-Agent: Mutt/1.5.21 (2010-09-15) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=AWL,BAYES_00 autolearn=no SpamAssassin version=3.3.1 -2.0 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 AWL AWL: From: address is in the auto white-list Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Fri, 2011-12-23 at 11:19 +0100, Ingo Molnar wrote: > > * Dave Jones wrote: > > > > > The panic-on-framebuffer code seems to cause a schedule > > > to occur during an oops. This causes a bunch of extra > > > spew as can be seen in https://bugzilla.redhat.com/attachment.cgi?id=549230 > > > > > > Would this (untested) patch be sufficient here, or does the drm > > > code need rearchitecting to not perform allocations during panic ? > > > > > > Signed-off-by: Dave Jones > > > > > > diff --git a/kernel/sched.c b/kernel/sched.c > > > index d6b149c..627f788 100644 > > > --- a/kernel/sched.c > > > +++ b/kernel/sched.c > > > @@ -4321,6 +4321,9 @@ static noinline void __schedule_bug(struct task_struct *prev) > > > { > > > struct pt_regs *regs = get_irq_regs(); > > > > > > + if (oops_in_progress) > > > + return; > > > + > > > printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", > > > prev->comm, prev->pid, preempt_count()); > > > > > > > Doing that makes sense - if an oops in going on we don't > > want to produce recursive messages. Note that scheduler code > > has been moved to kernel/sched/, so i've changed the patch > > accordingly. > > Urgh I would actually argue against merging this. What the KSM > console does is horridly wrong, and simply papering over it > doesn't help its cause. Its up there with USB-Serial console > on wrongness. Well, i agree in principle, but not escallating an already bad scenario would be a basic robustness rule. We do skip certain things on oops_in_progress already. Linus, Andrew, what would be your preference? Thanks, Ingo