diff options
author | Davi Arnaut <davi.arnaut@gmail.com> | 2005-11-07 00:59:36 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 07:53:39 -0800 |
commit | ce44eeb6906cf2b093b76ea69b952621712a4a3c (patch) | |
tree | 7fbf66bef211951dfac7c114de2bf3ae5fcb15a5 /fs/9p/vfs_inode.c | |
parent | be586bab8bfbf5d429bdfcb6136bdde89583c5c4 (diff) | |
download | op-kernel-dev-ce44eeb6906cf2b093b76ea69b952621712a4a3c.zip op-kernel-dev-ce44eeb6906cf2b093b76ea69b952621712a4a3c.tar.gz |
[PATCH] V9FS: 'names_cache' memory leak
Data allocated with "__getname()" should always be free'd with "__putname()"
because of the AUDITSYSCALL code.
Signed-off-by: Davi Arnaut <davi.arnaut@gmail.com>
Cc: <rminnich@lanl.gov>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 2b696ae..be72881 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -1105,7 +1105,7 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer, } } - putname(link); + __putname(link); return retval; } @@ -1129,7 +1129,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd) len = v9fs_readlink(dentry, link, strlen(link)); if (len < 0) { - putname(link); + __putname(link); link = ERR_PTR(len); } else link[len] = 0; @@ -1152,7 +1152,7 @@ static void v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void dprintk(DEBUG_VFS, " %s %s\n", dentry->d_name.name, s); if (!IS_ERR(s)) - putname(s); + __putname(s); } /** @@ -1228,7 +1228,7 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir, FreeMem: kfree(mistat); kfree(fcall); - putname(symname); + __putname(symname); return retval; } @@ -1319,7 +1319,7 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) FreeMem: kfree(mistat); kfree(fcall); - putname(symname); + __putname(symname); return retval; } |