Skip to contentSkip to conversation

ovl: Put upperdentry if ovl_check_origin() fails

PATCH Applied Vivek Goyal 3 participants 4 messages Nov 1, 2017 – Nov 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ovl: Put upperdentry if ovl_check_origin() fails

If ovl_check_origin() fails, we should put upperdentry. We have a reference on it by now. So goto out_put_upper instead of out.

Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")
---
 fs/overlayfs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/namei.c +1 -1
index a12dc10bf726..bc6d5c5a3443 100644
@@ -630,7 +630,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
 			err = ovl_check_origin(upperdentry, roe->lowerstack,
 					       roe->numlower, &stack, &ctr);
 			if (err)
-				goto out;
+				goto out_put_upper;
 		}
 
 		if (d.redirect) {
Signature · 1 line
2.13.6
#1 lore raw
Quoted 6 lines · Vivek Goyal

If ovl_check_origin() fails, we should put upperdentry. We have a reference on it by now. So goto out_put_upper instead of out.

Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")

Hi Amir, Miklos,

Does this patch look fine? I think its a simple bug fix and should go in 4.15.

Vivek

Quoted 24 lines
---
 fs/overlayfs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/namei.c +1 -1
index a12dc10bf726..bc6d5c5a3443 100644
@@ -630,7 +630,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
 			err = ovl_check_origin(upperdentry, roe->lowerstack,
 					       roe->numlower, &stack, &ctr);
 			if (err)
-				goto out;
+				goto out_put_upper;
 		}
 
 		if (d.redirect) {
Signature · 6 lines
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#2 lore raw
Quoted 4 lines · Vivek Goyal
Quoted 3 lines · Vivek Goyal

If ovl_check_origin() fails, we should put upperdentry. We have a reference on it by now. So goto out_put_upper instead of out.

Quoted 9 lines
Quoted 3 lines
Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")

Hi Amir, Miklos,

Does this patch look fine? I think its a simple bug fix and should go in 4.15.

Agreed.

Amir.

maintainer Applied
#3 lore raw
Quoted 9 lines · Amir Goldstein
Quoted 8 lines · Vivek Goyal
Quoted 6 lines · Vivek Goyal

If ovl_check_origin() fails, we should put upperdentry. We have a reference on it by now. So goto out_put_upper instead of out.

Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")
Quoted 5 lines
Quoted 5 lines

Hi Amir, Miklos,

Does this patch look fine? I think its a simple bug fix and should go in 4.15.

Thanks, applied.

Miklos