[Devel] [PATCH] overlayfs: add dynamic path resolving in mount options

Vasily Averin vvs at virtuozzo.com
Fri May 22 16:34:49 MSK 2020



On 5/22/20 11:01 AM, Alexander Mikhalitsyn wrote:
> +int print_paths_option(struct seq_file *m, const char *name, struct ovl_fs *ofs)
> +{
> +	unsigned int order = ilog2(ofs->numlower) + 1;
> +	char *res = (char*)__get_free_pages(GFP_TEMPORARY, order);
> +	char *tmp = (char*)__get_free_page(GFP_TEMPORARY);
> +	char *pathname;
> +	int len;
> +	int i;
> +	char *shift;
> +
> +	if (!res)
> +		return -ENOMEM;
tmp will be leaked here

> +
> +	if (!tmp)
> +		return -ENOMEM;
> +


More information about the Devel mailing list