diff options
-rw-r--r-- | security/device_cgroup.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index ce14a31b1337..084c8e417564 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -589,9 +589,17 @@ static int propagate_exception(struct dev_cgroup *devcg_root, | |||
589 | 589 | ||
590 | static inline bool has_children(struct dev_cgroup *devcgroup) | 590 | static inline bool has_children(struct dev_cgroup *devcgroup) |
591 | { | 591 | { |
592 | struct cgroup *cgrp = devcgroup->css.cgroup; | 592 | bool ret; |
593 | 593 | ||
594 | return !list_empty(&cgrp->children); | 594 | /* |
595 | * FIXME: There may be lingering offline csses and this function | ||
596 | * may return %true when there isn't any userland-visible child | ||
597 | * which is incorrect for our purposes. | ||
598 | */ | ||
599 | rcu_read_lock(); | ||
600 | ret = css_next_child(NULL, &devcgroup->css); | ||
601 | rcu_read_unlock(); | ||
602 | return ret; | ||
595 | } | 603 | } |
596 | 604 | ||
597 | /* | 605 | /* |