[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4860866F.7050703@cn.fujitsu.com>
Date: Tue, 24 Jun 2008 13:30:23 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Paul Mundt <lethal@...ux-sh.org>
CC: linux-sh@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] sh: fix seq_file memory leak
When using single_open(), single_release() should be used instead
of seq_release(), otherwise there is a memory leak.
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
---
arch/sh/mm/cache-debugfs.c | 2 +-
arch/sh/mm/pmb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index c5b56d5..0e189cc 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -120,7 +120,7 @@ static const struct file_operations cache_debugfs_fops = {
.open = cache_debugfs_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = single_release,
};
static int __init cache_debugfs_init(void)
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index 0b0ec6e..95653e2 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -385,7 +385,7 @@ static const struct file_operations pmb_debugfs_fops = {
.open = pmb_debugfs_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = single_release,
};
static int __init pmb_debugfs_init(void)
--
1.5.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists