Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757570AbXHGHpv (ORCPT ); Tue, 7 Aug 2007 03:45:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754801AbXHGHpn (ORCPT ); Tue, 7 Aug 2007 03:45:43 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:54605 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528AbXHGHpm (ORCPT ); Tue, 7 Aug 2007 03:45:42 -0400 Date: Tue, 7 Aug 2007 00:44:55 -0700 From: Andrew Morton To: Greg KH , "Denis V. Lunev" , "Denis V. Lunev" , dev@openvz.org, devel@openvz.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pci_get_device call from interrupt in reboot fixups Message-Id: <20070807004455.b634c5d0.akpm@linux-foundation.org> In-Reply-To: <20070807002437.0e7b9ee5.akpm@linux-foundation.org> References: <20070803103924.GA23786@iris.sw.ru> <20070804040806.GF23330@suse.de> <46B6CAC4.3080202@sw.ru> <20070807024910.GB13657@suse.de> <20070807002437.0e7b9ee5.akpm@linux-foundation.org> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1729 Lines: 38 On Tue, 7 Aug 2007 00:24:37 -0700 Andrew Morton wrote: > > Andrew, I really don't want to change the PCI core to handle this, as we > > finally fixed a lot of issues with drivers trying to walk these lists > > from interrupt context. So if you want to just hide the warning message > > as we are shutting down, that's fine with me. Or just don't do the > > fixups. But grabbing a reference to the pci device is unsafe in my > > opinion and I do not want to do that. > > > > OK, good decision ;) > > One approach would be for some brave soul to pick his way through > the reboot code and ensure that we are correctly and reliably setting > system_state to SYSTEM_RESTART, then test that in __might_sleep(). > > But this does suppress somewhat-useful debugging just because of sysrq-B > and I really wouldn't want to utilise the horrid system_state any more that > we are presently doing. I think on balance that it would be better if we > could do something more targetted, like modify emergency_restart() to test > in_interrupt() and to then apologetically set some well-named global flag > which will shut up __might_sleep(). Pretty foul, but I can't think of > anything better. ok, this might be better. How about we just stop calling mach_reboot_fixups() at sysrq-B time? > > >> handle_sysrq > > >> machine_emergency_restart > > >> mach_reboot_fixups > > >> pci_get_device > > >> pci_get_subsys > > >> down_read - 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/