Re: [PATCH v2 07/13] x86/virt: Use higher-level allocator

From: Brendan Jackman

Date: Mon Jun 22 2026 - 06:27:49 EST


On Mon Jun 22, 2026 at 10:12 AM UTC, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Commit message factually misstates the difference between __alloc_pages_node() and alloc_pages_node()
> --
>
> commit ec153a4ff69fcf9b29806faedae74ed9c08f7dda
> Author: Brendan Jackman <jackmanb@xxxxxxxxxx>
>
> x86/virt: Use higher-level allocator
>
> This commit switches the __x86_vmx_init() function to use the higher-level
> alloc_pages_node() function instead of __alloc_pages_node(). The code change
> itself is safe and functions correctly.
>
>> The difference between __alloc_pages_node() and alloc_pages_node() is
>> that the former allows you to pass NUMA_NO_NODE.
>
> [Severity: Low]
> Is this description accurate?
>
> Looking at the definitions, __alloc_pages_node() explicitly contains a
> VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES), which forbids passing
> NUMA_NO_NODE (-1).
>
> Instead, alloc_pages_node() is the one that explicitly handles NUMA_NO_NODE
> by converting it to numa_mem_id().

Repeating myself[0] as this patch has a different CC list from the others:

Sashiko is correct, the commit message says "former" but it should say
"latter".

[0] https://lore.kernel.org/all/DJFI39RWHV1O.MMMMMZSK8E8C@xxxxxxxxx/