All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails
@ 2017-11-01 19:37 Vivek Goyal
  2017-11-08 14:27 ` Vivek Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2017-11-01 19:37 UTC (permalink / raw)
  To: linux-unionfs; +Cc: amir73il, miklos, vgoyal, stable

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")
Cc: <stable@vger.kernel.org> #4.12
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 fs/overlayfs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index a12dc10bf726..bc6d5c5a3443 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -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) {
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails
  2017-11-01 19:37 [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails Vivek Goyal
@ 2017-11-08 14:27 ` Vivek Goyal
  2017-11-08 15:11   ` Amir Goldstein
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2017-11-08 14:27 UTC (permalink / raw)
  To: linux-unionfs; +Cc: amir73il, miklos, stable

On Wed, Nov 01, 2017 at 03:37:22PM -0400, Vivek Goyal wrote:
> 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")
> Cc: <stable@vger.kernel.org> #4.12
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

Hi Amir, Miklos,

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

Vivek
> ---
>  fs/overlayfs/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
> index a12dc10bf726..bc6d5c5a3443 100644
> --- a/fs/overlayfs/namei.c
> +++ b/fs/overlayfs/namei.c
> @@ -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) {
> -- 
> 2.13.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails
  2017-11-08 14:27 ` Vivek Goyal
@ 2017-11-08 15:11   ` Amir Goldstein
  2017-11-09 10:07     ` Miklos Szeredi
  0 siblings, 1 reply; 4+ messages in thread
From: Amir Goldstein @ 2017-11-08 15:11 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: overlayfs, Miklos Szeredi, stable [v4.9]

On Wed, Nov 8, 2017 at 4:27 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> On Wed, Nov 01, 2017 at 03:37:22PM -0400, Vivek Goyal wrote:
>> 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")
>> Cc: <stable@vger.kernel.org> #4.12
>> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
>
> Hi Amir, Miklos,
>
> Does this patch look fine? I think its a simple bug fix and should go
> in 4.15.
>


Agreed.

Amir.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails
  2017-11-08 15:11   ` Amir Goldstein
@ 2017-11-09 10:07     ` Miklos Szeredi
  0 siblings, 0 replies; 4+ messages in thread
From: Miklos Szeredi @ 2017-11-09 10:07 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Vivek Goyal, overlayfs, stable [v4.9]

On Wed, Nov 8, 2017 at 4:11 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Wed, Nov 8, 2017 at 4:27 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
>> On Wed, Nov 01, 2017 at 03:37:22PM -0400, Vivek Goyal wrote:
>>> 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")
>>> Cc: <stable@vger.kernel.org> #4.12
>>> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
>>
>> Hi Amir, Miklos,
>>
>> Does this patch look fine? I think its a simple bug fix and should go
>> in 4.15.
>>

Thanks, applied.

Miklos

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-09 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 19:37 [PATCH 1/1] ovl: Put upperdentry if ovl_check_origin() fails Vivek Goyal
2017-11-08 14:27 ` Vivek Goyal
2017-11-08 15:11   ` Amir Goldstein
2017-11-09 10:07     ` Miklos Szeredi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.