From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
Mandeep Singh Baines
<msb-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Paul Menage <paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org>,
Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>
Subject: Re: [PATCH for-3.4-fixes] cgroup: cgroup_attach_task() could return -errno after success
Date: Fri, 30 Mar 2012 08:37:05 +0800 [thread overview]
Message-ID: <4F750031.3090903@huawei.com> (raw)
In-Reply-To: <20120329162620.GD28941-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Tejun Heo wrote:
> 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 <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reported-by: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>
> LKML-Reference: <alpine.LNX.2.00.1203282354440.25526-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
Acked-by: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
Mandeep Singh Baines <msb@chromium.org>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
Paul Menage <paul@paulmenage.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH for-3.4-fixes] cgroup: cgroup_attach_task() could return -errno after success
Date: Fri, 30 Mar 2012 08:37:05 +0800 [thread overview]
Message-ID: <4F750031.3090903@huawei.com> (raw)
In-Reply-To: <20120329162620.GD28941@google.com>
Tejun Heo wrote:
> 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 <tj@kernel.org>
> Reported-by: Jiri Kosina <jkosina@suse.cz>
> LKML-Reference: <alpine.LNX.2.00.1203282354440.25526@pobox.suse.cz>
Acked-by: Li Zefan <lizefan@huawei.com>
next prev parent reply other threads:[~2012-03-30 0:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 22:01 cgroups commit 61d1d219c4 breaks systemd Jiri Kosina
2012-03-28 22:01 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1203282354440.25526-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2012-03-29 16:04 ` Tejun Heo
2012-03-29 16:04 ` Tejun Heo
[not found] ` <20120329160433.GC28941-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-03-29 16:26 ` [PATCH for-3.4-fixes] cgroup: cgroup_attach_task() could return -errno after success Tejun Heo
2012-03-29 16:26 ` Tejun Heo
[not found] ` <20120329162620.GD28941-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-03-29 18:11 ` Mandeep Singh Baines
2012-03-29 18:11 ` Mandeep Singh Baines
2012-03-30 0:37 ` Li Zefan [this message]
2012-03-30 0:37 ` Li Zefan
2012-03-30 8:38 ` Jiri Kosina
2012-03-30 8:38 ` Jiri Kosina
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=4F750031.3090903@huawei.com \
--to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
--cc=kay.sievers-tD+1rO4QERM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=msb-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.