diff options
author | Kirill Korotaev <dev@sw.ru> | 2006-07-14 03:23:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-15 00:53:50 -0400 |
commit | de45921535bfc3b1f63b426c2a9739635f864283 (patch) | |
tree | 5a20bb0ce44bef589b6699e645da272e1a54bbea | |
parent | 9ee8ab9fbf21e6b87ad227cd46c0a4be41ab749b (diff) |
[PATCH] struct file leakage
2.6.16 leaks like hell. While testing, I found massive leakage
(reproduced in openvz) in:
*filp
*size-4096
And 1 object leaks in
*size-32
*size-64
*size-128
It is the fix for the first one. filp leaks in the bowels of namei.c.
Seems, size-4096 is file table leaking in expand_fdtables.
I have no idea what are the rest and why they show only accompanying
another leaks. Some debugging structs?
[akpm@osdl.org, Trond: remove the IS_ERR() check]
Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: <stable@kernel.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index c9750d755aff..e01070d7bf58 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1712,8 +1712,14 @@ do_link: | |||
1712 | if (error) | 1712 | if (error) |
1713 | goto exit_dput; | 1713 | goto exit_dput; |
1714 | error = __do_follow_link(&path, nd); | 1714 | error = __do_follow_link(&path, nd); |
1715 | if (error) | 1715 | if (error) { |
1716 | /* Does someone understand code flow here? Or it is only | ||
1717 | * me so stupid? Anathema to whoever designed this non-sense | ||
1718 | * with "intent.open". | ||
1719 | */ | ||
1720 | release_open_intent(nd); | ||
1716 | return error; | 1721 | return error; |
1722 | } | ||
1717 | nd->flags &= ~LOOKUP_PARENT; | 1723 | nd->flags &= ~LOOKUP_PARENT; |
1718 | if (nd->last_type == LAST_BIND) | 1724 | if (nd->last_type == LAST_BIND) |
1719 | goto ok; | 1725 | goto ok; |