Re: [PATCH V4 1/3] livepatch: remove 'struct completion finish' from klp_patch

From
Miroslav Benes <mbenes@suse.cz>
Date
2021-11-08 17:47:05
Also in
lkml
Reply to
Ming Lei, 2021-11-02
On Tue, 2 Nov 2021, Ming Lei wrote:
quoted hunk ↗ jump to hunk
The completion finish is just for waiting release of the klp_patch
object, then releases module refcnt. We can simply drop the module
refcnt in the kobject release handler of klp_patch.

This way also helps to support allocating klp_patch from heap.

Signed-off-by: Ming Lei <redacted>
---
 include/linux/livepatch.h |  1 -
 kernel/livepatch/core.c   | 12 +++---------
 2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 2614247a9781..9712818997c5 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -170,7 +170,6 @@ struct klp_patch {
 	bool enabled;
 	bool forced;
 	struct work_struct free_work;
-	struct completion finish;
 };
 
 #define klp_for_each_object_static(patch, obj) \
Petr pointed out the main problem. I'll just add that if it comes to it, 
you could also remove the inclusion of completion.h header file and a 
description of finish struct member.

Miroslav
Thread (13 messages) 13 messages, 3 authors, last reply 2021-11-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help