[v3 16/24] mm: huge_mm: Make sure all split_huge_pmd calls are checked

Kiryl Shutsemau kas at kernel.org
Tue Mar 31 01:41:34 AEDT 2026


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


More information about the Linuxppc-dev mailing list