Re: [patch for-4.20] Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"

From: Linus Torvalds
Date: Fri Dec 07 2018 - 17:34:06 EST


On Fri, Dec 7, 2018 at 2:27 PM David Rientjes <rientjes@xxxxxxxxxx> wrote:
>
> I noticed the race in 89c83fb539f9 ("mm, thp: consolidate THP gfp handling
> into alloc_hugepage_direct_gfpmask") that is fixed by the revert, but as
> you noted it didn't cleanup the second part which is the balancing act for
> gfp flags between alloc_hugepage_direct_gfpmask() and alloc_pages_vma().
> Syzbot found this to trigger the WARN_ON_ONCE() you mention.

Can you rewrite the commit message to explain this better rather than
the misleading "race" description?

Linus

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature