Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932304AbXGNXCS (ORCPT ); Sat, 14 Jul 2007 19:02:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932142AbXGNXCB (ORCPT ); Sat, 14 Jul 2007 19:02:01 -0400 Received: from hu-out-0506.google.com ([72.14.214.228]:43775 "EHLO hu-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932125AbXGNXB6 (ORCPT ); Sat, 14 Jul 2007 19:01:58 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=pgcqdTXTXfyg00SJ2Hf4bZ3/kXETTNgPFdB9gly1DI0u3wz3k08ujwiFnKFAtlfE6ggUwALaMxRmdwznYiBfCY48wJvwgWuetCZ2ojnOpYOjUxEdl+fecVD192VqJdQqr0agnKcFxrDjJKjjuUH5MgjJcw41qD1lduDubr02pao= Date: Sun, 15 Jul 2007 01:01:54 +0200 From: Luca Tettamanti To: Doug Thompson Cc: linux-kernel@vger.kernel.org, bluesmoke-devel@lists.sourceforge.net Subject: [2.6.22] edac: sleeping function called from invalid context Message-ID: <20070714230154.GA22439@dreamland.darkstar.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, as soon as I enable parity check on PCI bus (with polling - EDAC_POLL), the following warning is triggered: EDAC MC: Ver: 2.0.1 Jul 13 2007 BUG: sleeping function called from invalid context at /home/kronos/src/linux-2.6.git/kernel/rwsem.c:20 in_atomic():0, irqs_disabled():1 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<00000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x363/0x11e8 softirqs last enabled at (0): [] copy_process+0x363/0x11e8 softirqs last disabled at (0): [<00000000>] 0x0 [] down_read+0x15/0x49 [] schedule_timeout+0x79/0x8d [] pci_get_subsys+0x68/0xea [] process_timeout+0x0/0x5 [] pci_get_device+0x16/0x19 [] edac_kernel_thread+0x94/0x10c [edac_mc] [] edac_kernel_thread+0x0/0x10c [edac_mc] [] kthread+0x38/0x60 [] kthread+0x0/0x60 [] kernel_thread_helper+0x7/0x10 ======================= The warning is caused by the fact that do_pci_parity_check() calls edac_pci_dev_parity_iterator() with interrupts disabled and pci_get_device acquires pci_bus_sem (via pci_get_subsys). Luca -- "La mia teoria scientifica preferita e` quella secondo la quale gli anelli di Saturno sarebbero interamente composti dai bagagli andati persi nei viaggi aerei." -- Mark Russel