]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: enforce __must_check on VMA merge and split
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Fri, 6 Dec 2024 22:50:36 +0000 (22:50 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:40:51 +0000 (22:40 -0800)
commit24bd843b1d1017ffc479246c7fc17537eb180763
tree6b6fcabb5c97f8b5039758ad5046760179c8bf47
parent79dc2bff4d8d36f04d7683916eb6d4eb9ea04da4
mm: enforce __must_check on VMA merge and split

It is of critical importance to check the return results on VMA merge (and
split), failure to do so can result in use-after-free's.  This bug has
recurred, so have the compiler enforce this check to prevent any future
repetition.

Link: https://lkml.kernel.org/r/20241206225036.273103-1-lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vma.c
mm/vma.h