Re: [PATCH v2 07/13] x86/virt: Use higher-level allocator
From: sashiko-bot
Date: Mon Jun 22 2026 - 06:13:06 EST
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().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260622-alloc-trylock-v2-0-31f31367d420@xxxxxxxxxx?part=7