From: Miroslav Benes <mbenes@suse.cz>
To: Jiri Kosina <jikos@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Jessica Yu <jeyu@redhat.com>, Petr Mladek <pmladek@suse.com>,
live-patching@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] livepatch: make klp_mutex proper part of API
Date: Wed, 8 Mar 2017 12:31:34 +0100 (CET) [thread overview]
Message-ID: <alpine.LSU.2.20.1703081229150.772@pobox.suse.cz> (raw)
In-Reply-To: <alpine.LSU.2.20.1703081006420.31814@cbobk.fhfr.pm>
On Wed, 8 Mar 2017, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
>
> klp_mutex is shared between core.c and transition.c, and as such would
> rather be properly located in livepatch.h so that we don't have to play
> 'extern' games from .c sources.
>
> This also silences sparse warning (wrongly) suggesting that klp_mutex
> should be defined static.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
> include/linux/livepatch.h | 2 ++
> kernel/livepatch/transition.c | 2 --
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
> index 194991ef9347..4efa89f95dd7 100644
> --- a/include/linux/livepatch.h
> +++ b/include/linux/livepatch.h
> @@ -138,6 +138,8 @@ struct klp_patch {
> func->old_name || func->new_func || func->old_sympos; \
> func++)
>
> +extern struct mutex klp_mutex;
> +
> int klp_register_patch(struct klp_patch *);
> int klp_unregister_patch(struct klp_patch *);
> int klp_enable_patch(struct klp_patch *);
> diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
> index 0ab7abd53b0b..14f7ce64b002 100644
> --- a/kernel/livepatch/transition.c
> +++ b/kernel/livepatch/transition.c
> @@ -28,8 +28,6 @@
> #define MAX_STACK_ENTRIES 100
> #define STACK_ERR_BUF_SIZE 128
>
> -extern struct mutex klp_mutex;
> -
A nit, but could you also include "linux/livepatch.h" in transition.c to
make the dependency explicit (and not through patch.h or transition.h)?
Anyway, not a big deal and you can add my
Acked-by: Miroslav Benes <mbenes@suse.cz>
Miroslav
next prev parent reply other threads:[~2017-03-08 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 9:16 Jiri Kosina
2017-03-08 11:31 ` Miroslav Benes [this message]
2017-03-08 13:06 ` Josh Poimboeuf
2017-03-08 13:10 ` Miroslav Benes
2017-03-08 13:27 ` [PATCH v2] " Jiri Kosina
2017-03-08 13:29 ` Miroslav Benes
2017-03-08 13:38 ` Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.20.1703081229150.772@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=jeyu@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®