aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAnurup m2013-04-29 17:05:52 -0500
committerGreg Kroah-Hartman2013-05-07 22:08:20 -0500
commitf7a07f4a01c40b9e47a3c9afc285092bf7b52913 (patch)
treede94654ea05cc12e0ba587fd162701f8cafc85a5 /fs
parent092d8ddf4125492f86e9b99b03bd1816bfd94f97 (diff)
downloadkernel-omap-f7a07f4a01c40b9e47a3c9afc285092bf7b52913.tar.gz
kernel-omap-f7a07f4a01c40b9e47a3c9afc285092bf7b52913.tar.xz
kernel-omap-f7a07f4a01c40b9e47a3c9afc285092bf7b52913.zip
fs/fscache/stats.c: fix memory leak
commit ec686c9239b4d472052a271c505d04dae84214cc upstream. There is a kernel memory leak observed when the proc file /proc/fs/fscache/stats is read. The reason is that in fscache_stats_open, single_open is called and the respective release function is not called during release. Hence fix with correct release function - single_release(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=57101 Signed-off-by: Anurup m <anurup.m@huawei.com> Cc: shyju pv <shyju.pv@huawei.com> Cc: Sanil kumar <sanil.kumar@huawei.com> Cc: Nataraj m <nataraj.m@huawei.com> Cc: Li Zefan <lizefan@huawei.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/fscache/stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
index 8179e8bc4a3d..40d13c70ef51 100644
--- a/fs/fscache/stats.c
+++ b/fs/fscache/stats.c
@@ -287,5 +287,5 @@ const struct file_operations fscache_stats_fops = {
287 .open = fscache_stats_open, 287 .open = fscache_stats_open,
288 .read = seq_read, 288 .read = seq_read,
289 .llseek = seq_lseek, 289 .llseek = seq_lseek,
290 .release = seq_release, 290 .release = single_release,
291}; 291};