From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: scsi_scan: WARNING: at include/linux/blkdev.h:431 blk_queue_init_tags+0x107/0x120() Date: Wed, 07 May 2008 17:40:26 -0500 Message-ID: <1210200026.3067.25.camel@localhost.localdomain> References: <20080502111652T.tomof@acm.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from accolon.hansenpartnership.com ([76.243.235.52]:53801 "EHLO accolon.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757314AbYEGWke (ORCPT ); Wed, 7 May 2008 18:40:34 -0400 In-Reply-To: <20080502111652T.tomof@acm.org> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: FUJITA Tomonori Cc: jesper.juhl@gmail.com, jens.axboe@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org On Fri, 2008-05-02 at 11:17 +0900, FUJITA Tomonori wrote: > On Fri, 2 May 2008 00:43:30 +0200 (CEST) > Jesper Juhl wrote: > > > Hi, > > > > For your information; > > > > I just build and booted the tip of Linus' git tree (HEAD at > > 886c35fbcf6fb2eee15687efc2d64d99b6ad9a4a) and got this in dmesg during > > bootup : > > > > ------------[ cut here ]------------ > > WARNING: at include/linux/blkdev.h:431 blk_queue_init_tags+0x107/0x120() > > Modules linked in: > > Pid: 432, comm: scsi_scan_0 Not tainted 2.6.25-07351-g886c35f #1 > > [] warn_on_slowpath+0x54/0x70 > > [] ? check_object+0xe3/0x1f0 > > [] ? init_tag_map+0x59/0xb0 > > [] ? mark_held_locks+0x47/0x80 > > [] ? __kmalloc+0x6b/0x100 > > [] ? trace_hardirqs_on+0xb9/0x150 > > [] ? init_tag_map+0x59/0xb0 > > [] ? init_tag_map+0x59/0xb0 > > [] ? init_tag_map+0x59/0xb0 > > [] ? __blk_queue_init_tags+0x24/0x70 > > [] ? __blk_queue_init_tags+0x35/0x70 > > [] blk_queue_init_tags+0x107/0x120 > > [] ahc_platform_set_tags+0x191/0x1d0 > > [] ahc_linux_slave_configure+0x103/0x170 > > [] scsi_probe_and_add_lun+0x6e5/0x920 > > [] __scsi_scan_target+0xe8/0x5d0 > > [] ? native_sched_clock+0x87/0xd0 > > [] ? get_lock_stats+0x29/0x50 > > [] ? put_lock_stats+0xd/0x30 > > [] ? mark_held_locks+0x47/0x80 > > [] ? mutex_lock_nested+0x1b7/0x2a0 > > [] ? trace_hardirqs_on+0xb9/0x150 > > [] ? mutex_lock_nested+0x1aa/0x2a0 > > [] ? scsi_scan_host_selected+0x3a/0xf0 > > [] scsi_scan_channel+0x70/0x90 > > [] scsi_scan_host_selected+0xbd/0xf0 > > [] ? do_scan_async+0x0/0x140 > > [] do_scsi_scan_host+0x78/0x80 > > [] do_scan_async+0x14/0x140 > > [] ? complete+0x48/0x60 > > [] ? do_scan_async+0x0/0x140 > > [] kthread+0x42/0x70 > > [] ? kthread+0x0/0x70 > > [] kernel_thread_helper+0x7/0x1c > > The problem is that the commit 75ad23b expects that we hold the queue > lock for __blk_queue_free_tags, blk_queue_free_tags and > blk_queue_init_tags but we haven't. > > The simple fix is using queue_flag_set/clear_unlocked for them, then > it should work as before. However, it would be better to hold the > queue lock for blk_queue_free_tags and blk_queue_init_tags (we can > hold the queue lock in scsi_activate_tcq and scsi_deactivate_tcq). So is this the fix that everyone agrees on? And if so, whose tree is it going through (I tend to think block, since the original breakage came from the block tree). James