[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060905112621.b663bc7d.kamezawa.hiroyu@jp.fujitsu.com>
Date: Tue, 5 Sep 2006 11:26:21 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: ebiederm@...ssion.com (Eric W. Biederman)
Cc: linux-kernel@...r.kernel.org, akpm@...l.org,
saito.tadashi@...t.fujitsu.com, ak@...e.de, oleg@...sign.ru,
jdelvare@...e.de
Subject: Re: [PATCH] proc: readdir race fix.
On Mon, 04 Sep 2006 17:13:10 -0600
ebiederm@...ssion.com (Eric W. Biederman) wrote:
Hi, Hit OOM-Killer, because of memory leak of task struct.
patch is attached.
-Kame
task struct should be put always.
fs/proc/base.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.18-psfix/fs/proc/base.c
===================================================================
--- linux-2.6.18-psfix.orig/fs/proc/base.c 2006-09-05 10:42:40.000000000 +0900
+++ linux-2.6.18-psfix/fs/proc/base.c 2006-09-05 11:11:42.000000000 +0900
@@ -2193,8 +2193,8 @@
filp->f_pos = tgid + TGID_OFFSET;
len = snprintf(buf, sizeof(buf), "%d", tgid);
ino = fake_ino(tgid, PROC_TGID_INO);
+ put_task_struct(task);
if (filldir(dirent, buf, len, filp->f_pos, ino, DT_DIR) < 0) {
- put_task_struct(task);
goto out;
}
}
-
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