Re: [PATCH] ovl: Return -ENOMEM if an allocation fails ovl_lookup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, September 23, 2017 2:15:18 AM IST Dan Carpenter wrote:
> The error code is missing here so it means we return ERR_PTR(0) or NULL.
> The other error paths all return an error code so this probably should
> as well.
> 
> Fixes: 02b69b284cd7 ("ovl: lookup redirects")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
> index c3addd1114f1..beb8a988df51 100644
> --- a/fs/overlayfs/namei.c
> +++ b/fs/overlayfs/namei.c
> @@ -634,6 +634,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
>  		}
> 
>  		if (d.redirect) {
> +			err = -ENOMEM;
>  			upperredirect = kstrdup(d.redirect, GFP_KERNEL);
>  			if (!upperredirect)
>  				goto out_put_upper;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

The patch looks good.

Reviewed-by: Chandan Rajendra <chandan@xxxxxxxxxxxxxxxxxx>

-- 
chandan

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux