Re: [PATCH] PM: hibernate: Don't ignore return from set_memory_ro()
From: Kees Cook
Date: Sun Feb 18 2024 - 04:07:08 EST
On Sun, Feb 18, 2024 at 09:40:58AM +0100, Christophe Leroy wrote:
> set_memory_ro() and set_memory_rw() can fail, leaving memory
> unprotected.
>
> Take the returned value into account and abort in case of
> failure.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
More set_memory* consumers! :) Error paths look good to me.
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook