* Patch "cgroup: set css->id to -1 during init" has been added to the 4.6-stable tree
@ 2016-08-03 5:25 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-03 5:25 UTC (permalink / raw)
To: tj, gregkh, ww.tao0320; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
cgroup: set css->id to -1 during init
to the 4.6-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:
cgroup-set-css-id-to-1-during-init.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8fa3b8d689a54d6d04ff7803c724fb7aca6ce98e Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Thu, 26 May 2016 15:42:13 -0400
Subject: cgroup: set css->id to -1 during init
From: Tejun Heo <tj@kernel.org>
commit 8fa3b8d689a54d6d04ff7803c724fb7aca6ce98e upstream.
If percpu_ref initialization fails during css_create(), the free path
can end up trying to free css->id of zero. As ID 0 is unused, it
doesn't cause a critical breakage but it does trigger a warning
message. Fix it by setting css->id to -1 from init_and_link_css().
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Wenwei Tao <ww.tao0320@gmail.com>
Fixes: 01e586598b22 ("cgroup: release css->id after css_free")
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/cgroup.c | 1 +
1 file changed, 1 insertion(+)
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5063,6 +5063,7 @@ static void init_and_link_css(struct cgr
memset(css, 0, sizeof(*css));
css->cgroup = cgrp;
css->ss = ss;
+ css->id = -1;
INIT_LIST_HEAD(&css->sibling);
INIT_LIST_HEAD(&css->children);
css->serial_nr = css_serial_nr_next++;
Patches currently in stable-queue which might be from tj@kernel.org are
queue-4.6/memcg-css_alloc-should-return-an-err_ptr-value-on-error.patch
queue-4.6/memcg-mem_cgroup_migrate-may-be-called-with-irq-disabled.patch
queue-4.6/cgroup-disable-irqs-while-holding-css_set_lock.patch
queue-4.6/cgroup-set-css-id-to-1-during-init.patch
queue-4.6/cgroup-remove-redundant-cleanup-in-css_create.patch
queue-4.6/mm-memcontrol-fix-cgroup-creation-failure-after-many-small-jobs.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-03 5:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 5:25 Patch "cgroup: set css->id to -1 during init" has been added to the 4.6-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).