Skip to contentSkip to conversation

Patch "blkcg: fix double free of new_blkg in blkcg_init_queue" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 18, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

blkcg: fix double free of new_blkg in blkcg_init_queue

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 9b54d816e00425c3a517514e0d677bb3cec49258 Mon Sep 17 00:00:00 2001

From: Hou Tao <[email protected]>
Date: Fri, 3 Feb 2017 17:19:07 +0800
Subject: blkcg: fix double free of new_blkg in blkcg_init_queue

From: Hou Tao <[email protected]>

commit 9b54d816e00425c3a517514e0d677bb3cec49258 upstream.

If blkg_create fails, new_blkg passed as an argument will be freed by blkg_create, so there is no need to free it again.

---
 block/blk-cgroup.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
block/blk-cgroup.c +1 -3
@@ -1078,10 +1078,8 @@ int blkcg_init_queue(struct request_queu
 	if (preloaded)
 		radix_tree_preload_end();
 
-	if (IS_ERR(blkg)) {
-		blkg_free(new_blkg);
+	if (IS_ERR(blkg))
 		return PTR_ERR(blkg);
-	}
 
 	q->root_blkg = blkg;
 	q->root_rl.blkg = blkg;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch