From: Anurup m Date: Mon, 29 Apr 2013 22:05:52 +0000 (-0700) Subject: fs/fscache/stats.c: fix memory leak X-Git-Tag: v3.4.44~30 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ede49f3642cce1fe60ac81cb1953e7a8fd91e8ce;p=karo-tx-linux.git 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 Cc: shyju pv Cc: Sanil kumar Cc: Nataraj m Cc: Li Zefan Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c index 4765190d537f..73c0bd7f7424 100644 --- a/fs/fscache/stats.c +++ b/fs/fscache/stats.c @@ -276,5 +276,5 @@ const struct file_operations fscache_stats_fops = { .open = fscache_stats_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = single_release, };