diff options
author | Aleksa Sarai <cyphar@cyphar.com> | 2015-06-09 13:32:07 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-06-10 06:48:30 +0200 |
commit | 4a705c5c786dc7f85051ed262bb05a4ca275dded (patch) | |
tree | 6a2d9511d1633bda38a158811850c9d326172f52 /kernel/cgroup.c | |
parent | cgroup: replace explicit ss_mask checking with for_each_subsys_which (diff) | |
download | linux-4a705c5c786dc7f85051ed262bb05a4ca275dded.tar.xz linux-4a705c5c786dc7f85051ed262bb05a4ca275dded.zip |
cgroup: fix uninitialised iterator in for_each_subsys_which
Fix the fact that @ssid is uninitialised in the case where
CGROUP_SUBSYS_COUNT = 0 by setting ssid to 0.
Fixes: cb4a31675270 ("cgroup: use bitmask to filter for_each_subsys")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 6d6d3c752096..12b580f4338e 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -424,7 +424,7 @@ static int notify_on_release(const struct cgroup *cgrp) */ #define for_each_subsys_which(ss, ssid, ss_maskp) \ if (!CGROUP_SUBSYS_COUNT) /* to avoid spurious gcc warning */ \ - ; \ + (ssid) = 0; \ else \ for_each_set_bit(ssid, ss_maskp, CGROUP_SUBSYS_COUNT) \ if (((ss) = cgroup_subsys[ssid]) && false) \ |