lkml.org 
[lkml]   [2006]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 67/67] block layer: elv_iosched_show should get elv_list_lock

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Vasily Tarasov <vtaras@openvz.org>
elv_iosched_show function iterates other elv_list,
hence elv_list_lock should be got.

Also the question is: in elv_iosched_show, elv_iosched_store
q->elevator->elevator_type construction is used without locking q->queue_lock.
Is it expected?..

Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
block/elevator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.18.orig/block/elevator.c
+++ linux-2.6.18/block/elevator.c
@@ -892,7 +892,7 @@ ssize_t elv_iosched_show(request_queue_t
struct list_head *entry;
int len = 0;

- spin_lock_irq(q->queue_lock);
+ spin_lock_irq(&elv_list_lock);
list_for_each(entry, &elv_list) {
struct elevator_type *__e;

@@ -902,7 +902,7 @@ ssize_t elv_iosched_show(request_queue_t
else
len += sprintf(name+len, "%s ", __e->elevator_name);
}
- spin_unlock_irq(q->queue_lock);
+ spin_unlock_irq(&elv_list_lock);

len += sprintf(len+name, "\n");
return len;
--
-
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/

\
 
 \ /
  Last update: 2006-10-11 23:15    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site