Thread (32 messages) 32 messages, 8 authors, 2021-01-28

Re: [PATCH 03/13] livepatch: refactor klp_init_object

From: Christoph Hellwig <hch@lst.de>
Date: 2021-01-28 16:24:00
Also in: linux-kbuild, live-patching, lkml

On Wed, Jan 27, 2021 at 01:58:21PM +0100, Petr Mladek wrote:
quoted
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -54,9 +54,6 @@ static void klp_find_object_module(struct klp_object *obj)
 {
 	struct module *mod;
 
-	if (!klp_is_module(obj))
-		return;
-
We need to either update the function description or keep this check.

I prefer to keep the check. The function does the right thing also
for the object "vmlinux". Also the livepatch code includes many
similar paranoid checks that makes the code less error prone
against any further changes.
Well, the check is in the caller now where we have a conditional for
it.  So I'd be tempted to either update the comment, or just drop the
patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help