Messages in this thread Patch in this message |  | | Subject | Re: [PATCH 5/7] overlay filesystem (inode.c bad error path) | | From | Erez Zadok <> | | Date | Fri, 20 May 2011 01:39:37 -0400 |
| |
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) {
|  |