Re: [PATCH] mm/hugetlb: Guard dequeue_hugetlb_folio_nodemask against NUMA_NO_NODE uses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jun 12, 2024, at 16:29, Oscar Salvador <osalvador@xxxxxxx> wrote:
> 
> dequeue_hugetlb_folio_nodemask() expects a preferred node where to get the
> hugetlb page from.
> It does not expect, though, users to pass NUMA_NO_NODE, otherwise we will
> get trash when trying to get the zonelist from that node.
> All current users are careful enough to not pass NUMA_NO_NODE, but
> it opens the door for new users to get this wrong since it is not
> documented [0].
> Guard against this by getting the local nid if NUMA_NO_NODE was passed.
> 
> [0] https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@xxxxxxxxxx/
> 
> Closes: https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@xxxxxxxxxx/
> Reported-and-tested-by: syzbot+569ed13f4054f271087b@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>

Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux