Re: [v3 16/24] mm: huge_mm: Make sure all split_huge_pmd calls are checked
From: Kiryl Shutsemau
Date: Mon Mar 30 2026 - 10:54:17 EST
On Thu, Mar 26, 2026 at 07:08:58PM -0700, Usama Arif wrote:
> Mark __split_huge_pmd(), split_huge_pmd() and split_huge_pmd_address()
> with __must_check so the compiler warns if any caller ignores the return
> value. Not checking return value and operating on the basis that the pmd
> is split could result in a kernel bug. The possibility of an order-0
> allocation failing for page table allocation is very low, but it should
> be handled correctly.
I think we want the same __must_check annotation on stubs for CONFIG_THP=n.
--
Kiryl Shutsemau / Kirill A. Shutemov