summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 11:55:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 11:55:00 -0700
commit35da7a307c535f9c2929cae277f3df425c9f9b1e (patch)
tree2734d54cfa0df8f3b81a4e6179a1eb9489fc1aad
parent5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (diff)
parent7ad58c028652753814054f4e3ac58f925e7343f4 (diff)
downloadlinux-35da7a307c535f9c2929cae277f3df425c9f9b1e.tar.bz2
Merge branch 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block: block: fix use-after-free bug in blk throttle code
-rw-r--r--block/blk-core.c2
-rw-r--r--block/blk-sysfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 45141469e89e..51efd835d4cf 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -462,8 +462,6 @@ void blk_cleanup_queue(struct request_queue *q)
if (q->elevator)
elevator_exit(q->elevator);
- blk_throtl_exit(q);
-
blk_put_queue(q);
}
EXPORT_SYMBOL(blk_cleanup_queue);
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index da8a8a40cd4c..013457f47fdc 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -471,6 +471,8 @@ static void blk_release_queue(struct kobject *kobj)
blk_sync_queue(q);
+ blk_throtl_exit(q);
+
if (rl->rq_pool)
mempool_destroy(rl->rq_pool);