Re: [PATCH v3 04/26] x86/mm: split out preallocate_sub_pgd()

Yosry Ahmed <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
> >> +
> >> +	/*
> >> +	 * On 4-level systems, the P4D layer is folded away and
> >> +	 * the above code does no preallocation.  Below, go down
> >> +	 * to the pud _software_ level to ensure the second
> >> +	 * hardware level is allocated on 4-level systems too.
> >> +	 */
> >> +	lvl = "pud";
> >> +	pud = pud_alloc(mm, p4d, addr);
> >> +	if (!pud)
> >> +		goto failed;
> >> +	return 0;
> >> +
> >> +failed:
> >> +	pr_warn_ratelimited("Failed to preallocate %s\n", lvl);
> >
> > Can this possibly fire more than once? IIUC we will panic right after
> > returning.
> 
> In the immediate usecase no, but once it's used for
> mm_local_map_to_user() we do actually handle failure.

Oh yeah I missed this, thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.