From: Andrew Morton Subject: Fw: 2.6.8-rc3-mm2: Debug: sleeping function called from invalid context at mm/mempool.c:197 Date: Mon, 9 Aug 2004 15:37:40 -0700 Sender: linux-scsi-owner@vger.kernel.org Message-ID: <20040809153740.3dd31e2b.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from fw.osdl.org ([65.172.181.6]:29901 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S267319AbUHIWeL (ORCPT ); Mon, 9 Aug 2004 18:34:11 -0400 List-Id: linux-scsi@vger.kernel.org To: linux-scsi@vger.kernel.org Cc: Janet Morgan qla2x00_get_new_sp() does a GFP_KERNEL allocation on the IO submission path. That can cause recursion into already-held filesystem and VFS locks, so at the very least the allocation should be GFP_NOIO. But even that is wrong, because some lock is held - probably the queue lock. iow: it's all screwed up. Is there any fix which is less lame than replacing the GFP_KERNEL with GFP_ATOMIC? Begin forwarded message: Date: Mon, 09 Aug 2004 06:41:52 -0700 From: Janet Morgan To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: 2.6.8-rc3-mm2: Debug: sleeping function called from invalid context at mm/mempool.c:197 I see the msg below while running on 2.6.8-rc3-mm2, but not on the plain rc3 tree; ditto for rc1-mm1 vs rc1, which is as far back as I've gone so far. I'm using QLogic QLA2200 adapters and both ext2/ext3 filesystems. The problem is very recreatable for me -- I pretty much just open a large file on one of the qlogic-attached devices. I tried backing out bk-scsi.patch for the heck of it, but I still see the problem. Aug 9 10:33:43 elm3b81 kernel: Debug: sleeping function called from invalid context at mm/mempool.c:197 Aug 9 10:33:43 elm3b81 kernel: in_atomic():1, irqs_disabled():0 Aug 9 10:33:43 elm3b81 kernel: [] dump_stack+0x1e/0x30 Aug 9 10:33:43 elm3b81 kernel: [] __might_sleep+0x99/0xb0 Aug 9 10:33:43 elm3b81 kernel: [] mempool_alloc+0x14b/0x150 Aug 9 10:33:43 elm3b81 kernel: [] qla2x00_get_new_sp+0x1c/0x30 [qla2xxx] Aug 9 10:33:43 elm3b81 kernel: [] qla2x00_queuecommand+0x3a/0x6a0 [qla2xxx] Aug 9 10:33:43 elm3b81 kernel: [] scsi_dispatch_cmd+0x141/0x1e0 Aug 9 10:33:43 elm3b81 kernel: [] scsi_request_fn+0x1ef/0x3d0 Aug 9 10:33:43 elm3b81 kernel: [] blk_run_queue+0x32/0x50 Aug 9 10:33:43 elm3b81 kernel: [] scsi_end_request+0xd0/0xf0 Aug 9 10:33:43 elm3b81 kernel: [] scsi_io_completion+0x134/0x440 Aug 9 10:33:43 elm3b81 kernel: [] sd_rw_intr+0x5f/0x280 Aug 9 10:33:43 elm3b81 kernel: [] scsi_finish_command+0x73/0xb0 Aug 9 10:33:43 elm3b81 kernel: [] scsi_softirq+0xab/0xd0 Aug 9 10:33:43 elm3b81 kernel: [] __do_softirq+0xbc/0xd0 Aug 9 10:33:43 elm3b81 kernel: [] do_softirq+0x35/0x40 Aug 9 10:33:43 elm3b81 kernel: [] do_IRQ+0x107/0x130 Aug 9 10:33:43 elm3b81 kernel: [] common_interrupt+0x18/0x20 Thanks, -Janet - 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/