From 8f121918f2e49f852de1acdc5255cc1ef440d85b Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 29 Mar 2012 22:03:33 -0700 Subject: [PATCH] cgroup: cgroup_attach_task() could return -errno after success 61d1d219c4 "cgroup: remove extra calls to find_existing_css_set" made cgroup_task_migrate() return void. An unfortunate side effect was that cgroup_attach_task() was depending on that function's return value to clear its @retval on the success path. On cgroup mounts without any subsystem with ->can_attach() callback, cgroup_attach_task() ended up returning @retval without initializing it on success. For some reason, gcc failed to warn about it and it didn't cause cgroup_attach_task() to return non-zero value in many cases, probably due to difference in register allocation. When the problem materializes, systemd fails to populate /systemd cgroup mount and fails to boot. Fix it by initializing @retval to zero on declaration. Signed-off-by: Tejun Heo Reported-by: Jiri Kosina LKML-Reference: Reviewed-by: Mandeep Singh Baines Acked-by: Li Zefan --- Reading git-format-patch failed