* [PATCH] FUSE: inode leak fix
@ 2005-03-04 23:16 Miklos Szeredi
0 siblings, 0 replies; only message in thread
From: Miklos Szeredi @ 2005-03-04 23:16 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-05 0:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04 23:16 [PATCH] FUSE: inode leak fix Miklos Szeredi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).