diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-02-02 13:44:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 18:11:22 -0800 |
commit | 4528fd0595847c2078b59f24800e751c2d6b7e41 (patch) | |
tree | 0be4aca79bc9b6709d4762f43ae53e2589931a85 /kernel/exec_domain.c | |
parent | ef2b9b054580ef835078d8aa411bd06542cd5c1c (diff) |
cgroups: fix to return errno in a failure path
In cgroup_create(), if alloc_css_id() returns failure, the errno is not
propagated to userspace, so mkdir will fail silently.
To trigger this bug, we mount blkio (or memory subsystem), and create more
then 65534 cgroups. (The number of cgroups is limited to 65535 if a
subsystem has use_id == 1)
# mount -t cgroup -o blkio xxx /mnt
# for ((i = 0; i < 65534; i++)); do mkdir /mnt/$i; done
# mkdir /mnt/65534
(should return ENOSPC)
#
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Paul Menage <menage@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exec_domain.c')
0 files changed, 0 insertions, 0 deletions