diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 87441fc75663..ef909a329750 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2994,6 +2994,7 @@ static void cgroup_event_remove(struct work_struct *work) | |||
2994 | 2994 | ||
2995 | eventfd_ctx_put(event->eventfd); | 2995 | eventfd_ctx_put(event->eventfd); |
2996 | kfree(event); | 2996 | kfree(event); |
2997 | dput(cgrp->dentry); | ||
2997 | } | 2998 | } |
2998 | 2999 | ||
2999 | /* | 3000 | /* |
@@ -3114,6 +3115,13 @@ static int cgroup_write_event_control(struct cgroup *cgrp, struct cftype *cft, | |||
3114 | goto fail; | 3115 | goto fail; |
3115 | } | 3116 | } |
3116 | 3117 | ||
3118 | /* | ||
3119 | * Events should be removed after rmdir of cgroup directory, but before | ||
3120 | * destroying subsystem state objects. Let's take reference to cgroup | ||
3121 | * directory dentry to do that. | ||
3122 | */ | ||
3123 | dget(cgrp->dentry); | ||
3124 | |||
3117 | spin_lock(&cgrp->event_list_lock); | 3125 | spin_lock(&cgrp->event_list_lock); |
3118 | list_add(&event->list, &cgrp->event_list); | 3126 | list_add(&event->list, &cgrp->event_list); |
3119 | spin_unlock(&cgrp->event_list_lock); | 3127 | spin_unlock(&cgrp->event_list_lock); |