Skip to content

Commit

Permalink
[PATCH] struct file leakage
Browse files Browse the repository at this point in the history
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?

[[email protected], Trond: remove the IS_ERR() check]
Signed-off-by: Alexey Kuznetsov <[email protected]>
Cc: Kirill Korotaev <[email protected]>
Cc: <[email protected]>
Cc: Trond Myklebust <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Jul 15, 2006
1 parent 9ee8ab9 commit de45921
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,8 +1712,14 @@ int open_namei(int dfd, const char *pathname, int flag,
if (error)
goto exit_dput;
error = __do_follow_link(&path, nd);
if (error)
if (error) {
/* Does someone understand code flow here? Or it is only
* me so stupid? Anathema to whoever designed this non-sense
* with "intent.open".
*/
release_open_intent(nd);
return error;
}
nd->flags &= ~LOOKUP_PARENT;
if (nd->last_type == LAST_BIND)
goto ok;
Expand Down

0 comments on commit de45921

Please sign in to comment.