Re: [PATCH] PM: hibernate: Don't ignore return from set_memory_ro()

From: Rafael J. Wysocki
Date: Thu Feb 22 2024 - 14:11:12 EST


On Sun, Feb 18, 2024 at 10:07 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> 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>

Applied as 6.9 material, thanks!