summaryrefslogtreecommitdiffstats
path: root/net/mac80211/spectmgmt.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-05-24 10:50:24 +0900
committerTejun Heo <tj@kernel.org>2013-05-24 10:50:24 +0900
commit7805d000db30a3787a4c969bab6ae4d8a5fd8ce6 (patch)
tree5178e1adaa4f398d2c1367fb38633191e81764e5 /net/mac80211/spectmgmt.c
parentd6cbf35dac8a3dadb9103379820c96d7c85df3d9 (diff)
cgroup: fix a subtle bug in descendant pre-order walk
When cgroup_next_descendant_pre() initiates a walk, it checks whether the subtree root doesn't have any children and if not returns NULL. Later code assumes that the subtree isn't empty. This is broken because the subtree may become empty inbetween, which can lead to the traversal escaping the subtree by walking to the sibling of the subtree root. There's no reason to have the early exit path. Remove it along with the later assumption that the subtree isn't empty. This simplifies the code a bit and fixes the subtle bug. While at it, fix the comment of cgroup_for_each_descendant_pre() which was incorrectly referring to ->css_offline() instead of ->css_online(). Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: stable@vger.kernel.org
Diffstat (limited to 'net/mac80211/spectmgmt.c')
0 files changed, 0 insertions, 0 deletions