diff mbox series

[3/8] mm: enforce return value checking on get_page()

Message ID cdb5c295-1b19-9337-678a-77f8320e9168@suse.com (mailing list archive)
State New, archived
Headers show
Series x86: XSA-40{1,2,8} follow-up | expand

Commit Message

Jan Beulich July 26, 2022, 4:04 p.m. UTC
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 <jbeulich@suse.com>

Comments

Julien Grall July 26, 2022, 5:32 p.m. UTC | #1
Hi Jan,

On 26/07/2022 17:04, Jan Beulich wrote:
> 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 <jbeulich@suse.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
diff mbox series

Patch

--- 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. */