Skip to content

Commit

Permalink
fs/fscache/stats.c: fix memory leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: shyju pv <[email protected]>
Cc: Sanil kumar <[email protected]>
Cc: Nataraj m <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: David Howells <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
anurupm authored and torvalds committed Apr 29, 2013
1 parent ee8ad72 commit ec686c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fscache/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,5 @@ const struct file_operations fscache_stats_fops = {
.open = fscache_stats_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = single_release,
};

0 comments on commit ec686c9

Please sign in to comment.