Re: [bug - scsi/blk] -git, WARNING: at include/linux/blkdev.h:427 __blk_run_queue+0x74/0xa0()

From: Jens Axboe
Date: Tue Apr 29 2008 - 16:04:42 EST


On Tue, Apr 29 2008, Ingo Molnar wrote:
>
> x86.git auto-testing found two new warnings below with latest -git:
>
> WARNING: at include/linux/blkdev.h:439 blk_remove_plug+0x69/0x80()
> WARNING: at include/linux/blkdev.h:427 __blk_run_queue+0x74/0xa0()
>
> one seems a relatively harmless init locking bug (unlocked access in a
> probe function), the other seems scarier as it happens in an irq handler
> and it likely would trigger multiple times if it wasnt a WARN_ON_ONCE().
>
> Config and full log at:
>
> http://redhat.com/~mingo/misc/log-Tue_Apr_29_21_40_46_CEST_2008.bad
> http://redhat.com/~mingo/misc/config-Tue_Apr_29_21_40_46_CEST_2008.bad

404 on those, but I think Bart and I already closed this one:

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 669b65c..9e2e23b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -418,8 +418,12 @@ struct request_queue

static inline int queue_is_locked(struct request_queue *q)
{
+#ifdef CONFIG_SMP
spinlock_t *lock = q->queue_lock;
return lock && spin_is_locked(lock);
+#else
+ return 1;
+#endif
}

static inline void queue_flag_set_unlocked(unsigned int flag,

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/