[Yaffs] [PATCH] fix memory leak when /proc/yaffs is read

Top Page
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jisheng Zhang
To: yaffs@stoneboat.aleph1.co.uk, Charles Manning
Subject: [Yaffs] [PATCH] fix memory leak when /proc/yaffs is read
There is a kernel memory leak observed when the proc file /proc/yaffs
is read. This reason is that in yaffs_proc_open, single_open is called
and the respective release function is not called during release.

Fix with correct release function - single_release().

Signed-off-by: Jisheng Zhang <>
yaffs_vfs_multi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c
index a36d9bf..e4edb2c 100644
--- a/yaffs_vfs_multi.c
+++ b/yaffs_vfs_multi.c
@@ -3687,6 +3687,7 @@ static struct file_operations procfs_ops = {
     .open  = yaffs_proc_open,
     .read  = seq_read,
     .write = yaffs_proc_write,
+    .release = single_release,

static int yaffs_procfs_init(void)