Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759132AbZAGUhc (ORCPT ); Wed, 7 Jan 2009 15:37:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753274AbZAGUhV (ORCPT ); Wed, 7 Jan 2009 15:37:21 -0500 Received: from rv-out-0506.google.com ([209.85.198.224]:4702 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbZAGUhT (ORCPT ); Wed, 7 Jan 2009 15:37:19 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=PE9Gly24zMqQHNbxPk7ogQQj/1PzJwxEFIedJMreQPJ3ykf/ScO7MvWeK7JzCxh+8I Axox0ogwkxD6oymsvl+NkW6hCeM+jAr/L63b5peBEzycGH2Cd7WdLSu4i/R/q6bbCZMl Y5OmzOguvF2SEY+qVbLeV2ZhJWTvZgFu+0dW0= Subject: Re: BUG in latest GIT 2.6.28-0658-g637b180 From: Harvey Harrison To: benh Cc: Larry Finger , LKML , linux-ide@vger.kernel.org, Bartlomiej Zolnierkiewicz In-Reply-To: <200901072115.40148.bzolnier@gmail.com> References: <49643869.8000500@lwfinger.net> <200901072115.40148.bzolnier@gmail.com> Content-Type: text/plain Date: Wed, 07 Jan 2009 12:37:17 -0800 Message-Id: <1231360637.5586.27.camel@brick> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4882 Lines: 113 Ben, Ben, Is this related to the IDE 'splat' you saw yesterday? Harvey On Wed, 2009-01-07 at 21:15 +0100, Bartlomiej Zolnierkiewicz wrote: > On Wednesday 07 January 2009, Larry Finger wrote: > > The latest GIT generates the following BUG. > > > > > > BUG: sleeping function called from invalid context at mm/slab.c:3046 > > in_atomic(): 0, irqs_disabled(): 1, pid: 523, name: modprobe > > no locks held by modprobe/523. > > irq event stamp: 17802 > > hardirqs last enabled at (17801): [] > > _spin_unlock_irqrestore+0x44/0x4c > > hardirqs last disabled at (17802): [] > > ide_probe_port+0x6c/0x469 [ide_core] > > softirqs last enabled at (17796): [] > > __do_softirq+0x159/0x166 > > softirqs last disabled at (17789): [] > > call_softirq+0x1c/0x28 > > Pid: 523, comm: modprobe Not tainted 2.6.28-Linus-06858-g637b180 #31 > > Call Trace: > > [] ? print_irqtrace_events+0xd0/0xd4 > > [] __might_sleep+0xf9/0xfb > > [] kmem_cache_alloc+0x2d/0x142 > > [] ide_probe_port+0x175/0x469 [ide_core] > > [] ide_host_register+0x2b8/0x611 [ide_core] > > [] ? do_ide_setup_pci_device+0x70/0xd3 [ide_core] > > [] ide_pci_init_one+0xcc/0xee [ide_core] > > [] ? trace_hardirqs_off+0xd/0xf > > [] ? _spin_unlock_irqrestore+0x3d/0x4c > > [] ? release_console_sem+0x1b0/0x1e5 > > [] ? printk+0x41/0x49 > > [] amd74xx_probe+0x13e/0x145 [amd74xx] > > [] ? init_chipset_amd74xx+0x0/0x160 [amd74xx] > > [] ? init_hwif_amd74xx+0x0/0x26 [amd74xx] > > [] pci_device_probe+0xc6/0x11d > > [] driver_probe_device+0xc3/0x168 > > [] __driver_attach+0x5d/0x80 > > [] ? __driver_attach+0x0/0x80 > > [] bus_for_each_dev+0x59/0x90 > > [] driver_attach+0x21/0x23 > > [] bus_add_driver+0xbf/0x20c > > [] driver_register+0xb0/0x130 > > [] __pci_register_driver+0x68/0xa3 > > [] ? amd74xx_ide_init+0x0/0x20 [amd74xx] > > [] amd74xx_ide_init+0x1e/0x20 [amd74xx] > > [] _stext+0x5b/0x135 > > [] ? __blocking_notifier_call_chain+0x5d/0x6f > > [] sys_init_module+0xb0/0x1d3 > > [] system_call_fastpath+0x16/0x1b > > Fix below. Thanks again Larry! > > [ I now always run with LOCKDEP=y but the issue was probably hidden by the > ide_probe_port() IRQ masking cleanup (http://lkml.org/lkml/2009/1/6/267) > so I didn't catch it before push to Linus... ] > > From: Bartlomiej Zolnierkiewicz > Subject: [PATCH] ide: fix accidental LOCKDEP breakage caused by local_irq_set() removal > > commit 54cc1428cfa619e16d75baae8cb041a2eff015f0 ("ide: remove > local_irq_set() macro") accidentally replaced local_save_flags() > by local_irq_set() in ide_probe_port() and __ide_wait_stat() > which resulted in LOCKDEP breakage. > > Reported-by: Larry Finger > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > drivers/ide/ide-iops.c | 2 +- > drivers/ide/ide-probe.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > Index: b/drivers/ide/ide-iops.c > =================================================================== > --- a/drivers/ide/ide-iops.c > +++ b/drivers/ide/ide-iops.c > @@ -493,7 +493,7 @@ static int __ide_wait_stat(ide_drive_t * > stat = tp_ops->read_status(hwif); > > if (stat & ATA_BUSY) { > - local_irq_save(flags); > + local_save_flags(flags); > local_irq_enable_in_hardirq(); > timeout += jiffies; > while ((stat = tp_ops->read_status(hwif)) & ATA_BUSY) { > Index: b/drivers/ide/ide-probe.c > =================================================================== > --- a/drivers/ide/ide-probe.c > +++ b/drivers/ide/ide-probe.c > @@ -796,7 +796,7 @@ static int ide_probe_port(ide_hwif_t *hw > if (irqd) > disable_irq(hwif->irq); > > - local_irq_save(flags); > + local_save_flags(flags); > local_irq_enable_in_hardirq(); > > if (ide_port_wait_ready(hwif) == -EBUSY) > -- > 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/ -- 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/