[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.1901091549310.12972@pobox.suse.cz>
Date: Wed, 9 Jan 2019 15:50:09 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Petr Mladek <pmladek@...e.com>
cc: Jiri Kosina <jikos@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jason Baron <jbaron@...mai.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v15 04/11] livepatch: Don't block the removal of patches
loaded after a forced transition
On Wed, 9 Jan 2019, Petr Mladek wrote:
> module_put() is currently never called in klp_complete_transition() when
> klp_force is set. As a result, we might keep the reference count even when
> klp_enable_patch() fails and klp_cancel_transition() is called.
>
> This might give the impression that a module might get blocked in some
> strange init state. Fortunately, it is not the case. The reference count
> is ignored when mod->init fails and erroneous modules are always removed.
>
> Anyway, this might be confusing. Instead, this patch moves
> the global klp_forced flag into struct klp_patch. As a result,
> we block only modules that might still be in use after a forced
> transition. Newly loaded livepatches might be eventually completely
> removed later.
>
> It is not a big deal. But the code is at least consistent with
> the reality.
>
> Signed-off-by: Petr Mladek <pmladek@...e.com>
> Acked-by: Joe Lawrence <joe.lawrence@...hat.com>
Acked-by: Miroslav Benes <mbenes@...e.cz>
Miroslav
Powered by blists - more mailing lists