lkml.org 
[lkml]   [2021]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 1/3] livepatch: remove 'struct completion finish' from klp_patch
On Tue, 2 Nov 2021, Ming Lei wrote:

> 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 <ming.lei@redhat.com>
> ---
> 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

\
 
 \ /
  Last update: 2021-11-08 18:48    [W:0.115 / U:1.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site