Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965158AbVKGT1b (ORCPT ); Mon, 7 Nov 2005 14:27:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965184AbVKGT1b (ORCPT ); Mon, 7 Nov 2005 14:27:31 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:9107 "HELO iolanthe.rowland.org") by vger.kernel.org with SMTP id S965158AbVKGT1a (ORCPT ); Mon, 7 Nov 2005 14:27:30 -0500 Date: Mon, 7 Nov 2005 14:27:29 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Andrew Morton cc: Reuben Farrelly , , , , James Bottomley , Subject: Re: 2.6.14-mm1 In-Reply-To: <20051107105257.333248c0.akpm@osdl.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2396 Lines: 58 On Mon, 7 Nov 2005, Andrew Morton wrote: > Reuben Farrelly wrote: > > > > Debug: sleeping function called from invalid context at include/asm/semaphore.h:99 > > in_atomic():1, irqs_disabled():1 > > [] dump_stack+0x17/0x19 > > [] __might_sleep+0x9c/0xae > > [] scsi_disk_get_from_dev+0x15/0x48 > > [] sd_prepare_flush+0x17/0x5a > > [] scsi_prepare_flush_fn+0x30/0x33 > > [] blk_start_pre_flush+0xd5/0x13f > > [] elv_next_request+0x113/0x170 > > [] scsi_request_fn+0x4b/0x2fd > > [] blk_run_queue+0x2b/0x3c > > [] scsi_run_queue+0xa4/0xb6 > > [] scsi_next_command+0x16/0x19 > > [] scsi_end_request+0x93/0xc5 > > [] scsi_io_completion+0x141/0x46b > > [] sd_rw_intr+0x117/0x22b > > [] scsi_finish_command+0x7f/0x93 > > [] scsi_softirq+0xa8/0x11a > > [] __do_softirq+0x88/0x141 > > [] do_softirq+0x77/0x81 > > ======================= > > [] irq_exit+0x48/0x4a > > [] do_IRQ+0x74/0xa7 > > [] common_interrupt+0x1a/0x20 > > [] acpi_processor_idle+0x11f/0x2c7 [processor] > > [] cpu_idle+0x49/0xa0 > > [] rest_init+0x37/0x39 > > [] start_kernel+0x166/0x179 > > [] 0xc0100210 > > ah-hah, that's a different trace. > > sd_issue_flush() has been altered to run scsi_disk_get_from_dev(), which > takes a semaphore. It does this from within spinlock and, as we see here, > from within softirq. > > Methinks the people who developed and tested that patch forgot to enable > CONFIG_PREEMPT, CONFIG_DEBUG_KERNEL, CONFIG_DEBUG_SLAB, > CONFIG_DEBUG_SPINLOCK and CONFIG_DEBUG_SPINLOCK_SLEEP. No, believe it or not, all those items are enabled in my .config. What I didn't do was test the patch with anything that would force a call to sd_prepare_flush. In fact, I'm not sure how to do such a thing. I don't know how this should be fixed. James will have to come up with something. Alan Stern - 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/