[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2111081845150.1710@pobox.suse.cz>
Date: Mon, 8 Nov 2021 18:46:31 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Ming Lei <ming.lei@...hat.com>
cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Jiri Kosina <jikos@...nel.org>, Petr Mladek <pmladek@...e.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Joe Lawrence <joe.lawrence@...hat.com>
Subject: Re: [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@...hat.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
Powered by blists - more mailing lists