From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: 2.6.14-mm1 Date: Mon, 7 Nov 2005 10:52:57 -0800 Message-ID: <20051107105257.333248c0.akpm@osdl.org> References: <20051106182447.5f571a46.akpm@osdl.org> <436F2452.9020207@reub.net> <20051107020905.69c0b6dc.akpm@osdl.org> <17263.11214.992300.34384@cse.unsw.edu.au> <20051107023723.5cf63393.akpm@osdl.org> <436F3020.1040209@reub.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.osdl.org ([65.172.181.4]:59858 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964925AbVKGSxU (ORCPT ); Mon, 7 Nov 2005 13:53:20 -0500 In-Reply-To: <436F3020.1040209@reub.net> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Reuben Farrelly Cc: neilb@suse.de, linux-kernel@vger.kernel.org, n@suse.de, Alan Stern , James Bottomley , linux-scsi@vger.kernel.org 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.