Messages in this thread Patch in this message | | | Subject | [PATCH] FUSE: inode leak fix | From | Miklos Szeredi <> | Date | Sat, 05 Mar 2005 00:16:37 +0100 |
| |
Hi Andrew!
This patch fixes an inode leak in fuse_get_dentry(). With libfuse this practically never triggers, but a DoS exploit could be written.
Please Apply.
Thanks, Miklos
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
diff -rup linux-2.6.11-mm1/fs/fuse/inode.c linux-fuse/fs/fuse/inode.c --- linux-2.6.11-mm1/fs/fuse/inode.c 2005-03-04 23:26:59.000000000 +0100 +++ linux-fuse/fs/fuse/inode.c 2005-03-04 23:32:36.000000000 +0100 @@ -446,8 +446,12 @@ static struct dentry *fuse_get_dentry(st return ERR_PTR(-ESTALE); inode = ilookup5(sb, nodeid, fuse_inode_eq, &nodeid); - if (!inode || inode->i_generation != generation) + if (!inode) return ERR_PTR(-ESTALE); + if (inode->i_generation != generation) { + iput(inode); + return ERR_PTR(-ESTALE); + } entry = d_alloc_anon(inode); if (!entry) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |