lkml.org 
[lkml]   [2011]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 5/7] overlay filesystem (inode.c bad error path)
From
Date
Miklos,

I tried your overlayfs.v9 git repo w/ racer, using two separate ext3 filesystems (one for lowerdir and another for upperdir). I got the WARN_ON in ovl_permission to trigger within about 10 minutes of testing. Looking at the code, I see a problem in returning w/o cleaning up an dput-ing the alias dentry. Simple patch enclosed below.

Cheers,
Erez.


diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 3c15d54..6c70f57 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -80,7 +82,8 @@ int ovl_permission(struct inode *inode, int mask, unsigned int flags)
realinode = ACCESS_ONCE(realdentry->d_inode);
if (!realinode) {
WARN_ON(!(flags & IPERM_FLAG_RCU));
- return -ENOENT;
+ err = -ENOENT;
+ goto out_dput;
}

if (mask & MAY_WRITE) {


\
 
 \ /
  Last update: 2011-05-20 08:01    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog