diff options
author | Tejun Heo <tj@kernel.org> | 2013-11-28 00:17:27 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-11-28 00:17:27 +0100 |
commit | c729b11edf7458a939556e1889446184f42f37a7 (patch) | |
tree | 157c8a20d0c9b0cf9b5835855c9bfe3bfacb98d6 /kernel/cgroup.c | |
parent | cgroup: Merge branch 'memcg_event' into for-3.14 (diff) | |
parent | cgroup: fix cgroup_subsys_state leak for seq_files (diff) | |
download | linux-c729b11edf7458a939556e1889446184f42f37a7.tar.xz linux-c729b11edf7458a939556e1889446184f42f37a7.zip |
cgroup: Merge branch 'for-3.13-fixes' into for-3.14
Pull to receive e605b36575e8 ("cgroup: fix cgroup_subsys_state leak
for seq_files") as for-3.14 is scheduled to have a lot of changes
which depend on it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index be42967f4f1a..34fd1be0d9bf 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -166,6 +166,7 @@ static void cgroup_destroy_css_killed(struct cgroup *cgrp); static int cgroup_destroy_locked(struct cgroup *cgrp); static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[], bool is_add); +static int cgroup_file_release(struct inode *inode, struct file *file); /** * cgroup_css - obtain a cgroup's css for the specified subsystem @@ -2394,7 +2395,7 @@ static const struct file_operations cgroup_seqfile_operations = { .read = seq_read, .write = cgroup_file_write, .llseek = seq_lseek, - .release = single_release, + .release = cgroup_file_release, }; static int cgroup_file_open(struct inode *inode, struct file *file) @@ -2455,6 +2456,8 @@ static int cgroup_file_release(struct inode *inode, struct file *file) ret = cft->release(inode, file); if (css->ss) css_put(css); + if (file->f_op == &cgroup_seqfile_operations) + single_release(inode, file); return ret; } |