Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270460AbUJUIWv (ORCPT ); Thu, 21 Oct 2004 04:22:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270393AbUJUIVW (ORCPT ); Thu, 21 Oct 2004 04:21:22 -0400 Received: from mx2.elte.hu ([157.181.151.9]:65190 "EHLO mx2.elte.hu") by vger.kernel.org with ESMTP id S270661AbUJUIPm (ORCPT ); Thu, 21 Oct 2004 04:15:42 -0400 Date: Thu, 21 Oct 2004 10:12:15 +0200 From: Ingo Molnar To: Michal Schmidt Cc: linux-kernel@vger.kernel.org, Lee Revell , Rui Nuno Capela , Mark_H_Johnson@Raytheon.com, "K.R. Foley" , Bill Huey , Adam Heath , Florian Schmidt , Thomas Gleixner , Fernando Pablo Lopez-Lezcano Subject: Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8 Message-ID: <20041021081215.GA21073@elte.hu> References: <20041016153344.GA16766@elte.hu> <20041018145008.GA25707@elte.hu> <20041019124605.GA28896@elte.hu> <20041019180059.GA23113@elte.hu> <20041020094508.GA29080@elte.hu> <4176403B.5@stud.feec.vutbr.cz> <20041020105630.GB2614@elte.hu> <417645A4.7000802@stud.feec.vutbr.cz> <20041020120434.GA6297@elte.hu> <4176D9CC.5010107@stud.feec.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4176D9CC.5010107@stud.feec.vutbr.cz> User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1360 Lines: 34 * Michal Schmidt wrote: > That patch was not enough. The BUGs were still showing up the same as > before. I tried to debug it myself. I've found an interesting thing in > kernel/printk.c:release_console_sem(). There is the following > sequence: > > spin_lock_irqsave(&logbuf_lock, flags); > /* ... some code ... */ > spin_unlock(&logbuf_lock); > call_console_drivers(...); > local_irq_restore(flags); > > I know very little about locking, but I didn't like this two-phased > unlock. So I replaced it with a single spin_unlock_irqrestore. Patch > attached. I'm almost certain that there is a reason for the two-phased > unlocking and that this patch will break something, but so far it > works for me. netconsole now works without complaining. ah, indeed. Note that this is still not enough - please try to add a local_irq_enable() to netconsole.c's console-write function - does that fix it equally well for you? the reason is that if we crash within an irqs-off section then netconsole will still be called with interrupts disabled and will trigger the assert. Ingo - 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/