summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-18 07:46:32 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-18 07:46:32 +0300
commit0f49fc95b86fc77b867d643e2d38bc9f28035ed4 (patch)
treecdc6297fe95893905d7192df1e7dfb877517eead /include
parent49dc2b7173010792c6923930ffcee84b7094b7de (diff)
parent7e545d6eca20ce8ef7f66a63146cbff82b2ba760 (diff)
downloadlinux-0f49fc95b86fc77b867d643e2d38bc9f28035ed4.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching
Pull livepatching update from Jiri Kosina: - cleanup of module notifiers; this depends on a module.c cleanup which has been acked by Rusty; from Jessica Yu - small assorted fixes and MAINTAINERS update * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch/module: remove livepatch module notifier modules: split part of complete_formation() into prepare_coming_module() livepatch: Update maintainers livepatch: Fix the error message about unresolvable ambiguity klp: remove CONFIG_LIVEPATCH dependency from klp headers klp: remove superfluous errors in asm/livepatch.h
Diffstat (limited to 'include')
-rw-r--r--include/linux/livepatch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index a8828652f794..bd830d590465 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -134,6 +134,15 @@ int klp_unregister_patch(struct klp_patch *);
int klp_enable_patch(struct klp_patch *);
int klp_disable_patch(struct klp_patch *);
+/* Called from the module loader during module coming/going states */
+int klp_module_coming(struct module *mod);
+void klp_module_going(struct module *mod);
+
+#else /* !CONFIG_LIVEPATCH */
+
+static inline int klp_module_coming(struct module *mod) { return 0; }
+static inline void klp_module_going(struct module *mod) { }
+
#endif /* CONFIG_LIVEPATCH */
#endif /* _LINUX_LIVEPATCH_H_ */