From: Greg Kroah-Hartman Date: Sun, 18 Mar 2018 14:45:31 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.14.28~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ba9726f70250af04acc634c9003f387e61acf0f;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch --- diff --git a/queue-4.4/blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch b/queue-4.4/blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch new file mode 100644 index 00000000000..df21de69526 --- /dev/null +++ b/queue-4.4/blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch @@ -0,0 +1,35 @@ +From 9b54d816e00425c3a517514e0d677bb3cec49258 Mon Sep 17 00:00:00 2001 +From: Hou Tao +Date: Fri, 3 Feb 2017 17:19:07 +0800 +Subject: blkcg: fix double free of new_blkg in blkcg_init_queue + +From: Hou Tao + +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. + +Signed-off-by: Hou Tao +Signed-off-by: Jens Axboe +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + block/blk-cgroup.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/block/blk-cgroup.c ++++ b/block/blk-cgroup.c +@@ -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; diff --git a/queue-4.4/series b/queue-4.4/series new file mode 100644 index 00000000000..24be1264b5c --- /dev/null +++ b/queue-4.4/series @@ -0,0 +1 @@ +blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..24be1264b5c --- /dev/null +++ b/queue-4.9/series @@ -0,0 +1 @@ +blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch