summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-06-05 12:09:01 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-06-23 17:10:38 +0200
commita038e2536472b4dd932399b5277e65f188811de5 (patch)
tree15b311da1a9aa36b24f98ae914456ecb90e247f3 /block
parentbae386f7884aa3720cc7880b36a41a1d2b9c327b (diff)
downloadblackbird-op-linux-a038e2536472b4dd932399b5277e65f188811de5.tar.gz
blackbird-op-linux-a038e2536472b4dd932399b5277e65f188811de5.zip
[PATCH] blk_start_queue() must be called with irq disabled - add warning
The queue lock can be taken from interrupts so it must always be taken with irq disabling primitives. Some primitives already verify this. blk_start_queue() is called under this lock, so interrupts must be disabled. Also document this requirement clearly in blk_init_queue(), where the queue spinlock is set. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r--block/ll_rw_blk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 465b54312c59..17c42ddd31db 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1663,6 +1663,8 @@ static void blk_unplug_timeout(unsigned long data)
**/
void blk_start_queue(request_queue_t *q)
{
+ WARN_ON(!irqs_disabled());
+
clear_bit(QUEUE_FLAG_STOPPED, &q->queue_flags);
/*
@@ -1878,7 +1880,8 @@ EXPORT_SYMBOL(blk_alloc_queue_node);
* get dealt with eventually.
*
* The queue spin lock must be held while manipulating the requests on the
- * request queue.
+ * request queue; this lock will be taken also from interrupt context, so irq
+ * disabling is needed for it.
*
* Function returns a pointer to the initialized request queue, or NULL if
* it didn't succeed.
OpenPOWER on IntegriCloud