summaryrefslogtreecommitdiffstats
path: root/kernel/livepatch/transition.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-03-08 14:27:05 +0100
committerJiri Kosina <jkosina@suse.cz>2017-03-08 14:40:53 +0100
commit10517429b5ac242498d7d847f79f10c21d7eedb0 (patch)
tree427cab53a01e6f199b462d7dfb3eddbd99a91bec /kernel/livepatch/transition.c
parentlivepatch: allow removal of a disabled patch (diff)
downloadlinux-10517429b5ac242498d7d847f79f10c21d7eedb0.tar.xz
linux-10517429b5ac242498d7d847f79f10c21d7eedb0.zip
livepatch: make klp_mutex proper part of API
klp_mutex is shared between core.c and transition.c, and as such would rather be properly located in a header 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. Acked-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/livepatch/transition.c')
-rw-r--r--kernel/livepatch/transition.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 0ab7abd53b0b..2de09e0c4e5c 100644
--- a/kernel/livepatch/transition.c
+++ b/kernel/livepatch/transition.c
@@ -21,6 +21,7 @@
#include <linux/cpu.h>
#include <linux/stacktrace.h>
+#include "core.h"
#include "patch.h"
#include "transition.h"
#include "../sched/sched.h"
@@ -28,8 +29,6 @@
#define MAX_STACK_ENTRIES 100
#define STACK_ERR_BUF_SIZE 128
-extern struct mutex klp_mutex;
-
struct klp_patch *klp_transition_patch;
static int klp_target_state = KLP_UNDEFINED;