Re: [PATCH] livepatch: Cancel transition a safe way for immediate patches

From: Josh Poimboeuf
Date: Tue Apr 11 2017 - 11:10:55 EST


On Tue, Apr 11, 2017 at 01:07:48PM +0200, Petr Mladek wrote:
> klp_init_transition() does not set func->transition for immediate patches.
> Then klp_ftrace_handler() could use the new code immediately. As a result,
> it is not safe to put the livepatch module in klp_cancel_transition().
>
> This patch reverts most of the last minute changes klp_cancel_transition().
> It keeps the warning about a misuse because it still makes sense.
>
> Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>

Good catch Petr, thanks!

Fixes: 3ec24776bfd0 ("livepatch: allow removal of a disabled patch")
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

--
Josh