Commit 26c0273b authored by Kirill Korotaev's avatar Kirill Korotaev Committed by Adrian Bunk

fix struct file leakage

2.6.16 leaks like hell. While testing, I found massive filp leakage
(reproduced in openvz) in the bowels of namei.c.
Signed-off-by: default avatarAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent cbca4f2e
......@@ -1708,8 +1708,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment