lkml.org 
[lkml]   [2013]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[ PATCH ] Memory leak fix for bug 57101.
Date
Hi All,

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 respective release function is not called during release.
Hence fix with correct release function - single_release. The patch is as below

diff -uprN -X linux-3.9-rc8-vanilla/Documentation/dontdiff linux-3.9-rc8-vanilla/fs/fscache/stats.c linux-3.9-rc8.mod/fs/fscache/stats.c
--- linux-3.9-rc8-vanilla/fs/fscache/stats.c 2013-04-22 03:08:45.000000000 +0530
+++ linux-3.9-rc8.mod/fs/fscache/stats.c 2013-04-24 23:03:31.531296160 +0530
@@ -287,5 +287,5 @@ const struct file_operations fscache_sta
.open = fscache_stats_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = single_release,
};
Regards,
Anurup M


\
 
 \ /
  Last update: 2013-04-25 12:41    [W:0.195 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site