From b06edbf70e1a417a6f16b2cf9d799c560a2483b3 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 27 Jul 2022 12:58:50 +0200 Subject: [PATCH] mm: enforce return value checking on get_page() It's hard to imagine a case where an error may legitimately be ignored here. It's bad enough that in at least one case (set_shadow_status()) the return value was checked only by way of ASSERT()ing. Signed-off-by: Jan Beulich Acked-by: Julien Grall --- xen/include/xen/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 6dee421bb8..35b065146f 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -61,7 +61,7 @@ struct page_info; void put_page(struct page_info *); -bool get_page(struct page_info *, const struct domain *); +bool __must_check get_page(struct page_info *, const struct domain *); struct domain *__must_check page_get_owner_and_reference(struct page_info *); /* Boot-time allocator. Turns into generic allocator after bootstrap. */ -- 2.30.2