cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: lizefan@huawei.com, hannes@cmpxchg.org
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@fb.com, Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/4] cgroup: fix incorrect destination cgroup in cgroup_update_dfl_csses()
Date: Thu,  3 Mar 2016 12:19:59 -0500	[thread overview]
Message-ID: <1457025602-4193-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1457025602-4193-1-git-send-email-tj@kernel.org>

cgroup_update_dfl_csses() should move each task in the subtree to
self; however, it was incorrectly calling cgroup_migrate_add_src()
with the root of the subtree as @dst_cgrp.  Fortunately,
cgroup_migrate_add_src() currently uses @dst_cgrp only to determine
the hierarchy and the bug doesn't cause any actual breakages.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 kernel/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index c63fce0..50879aa 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2901,7 +2901,7 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp)
 		struct cgrp_cset_link *link;
 
 		list_for_each_entry(link, &dsct->cset_links, cset_link)
-			cgroup_migrate_add_src(link->cset, cgrp,
+			cgroup_migrate_add_src(link->cset, dsct,
 					       &preloaded_csets);
 	}
 	spin_unlock_bh(&css_set_lock);
-- 
2.5.0


  reply	other threads:[~2016-03-03 17:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 17:19 [PATCHSET cgroup/for-4.6] cgroup: update migration destination cgroup handling Tejun Heo
2016-03-03 17:19 ` Tejun Heo [this message]
2016-03-03 17:20 ` [PATCH 2/4] cgroup: move migration destination verification out of cgroup_migrate_prepare_dst() Tejun Heo
2016-03-03 17:20 ` [PATCH 4/4] cgroup: use css_set->mg_dst_cgrp for the migration target cgroup Tejun Heo
     [not found] ` <1457025602-4193-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-03-03 17:20   ` [PATCH 3/4] cgroup: make cgroup[_taskset]_migrate() take cgroup_root instead of cgroup Tejun Heo
2016-03-08 16:50   ` [PATCHSET cgroup/for-4.6] cgroup: update migration destination cgroup handling Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457025602-4193-2-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).