summaryrefslogtreecommitdiffstats
path: root/kernel/module/internal.h
diff options
context:
space:
mode:
authorAaron Tomlin <atomlin@redhat.com>2022-03-22 15:03:38 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2022-04-05 17:43:04 +0200
commit473c84d1856e83faebf059a52a8e49bdb89026d3 (patch)
tree71f68a36c00062bb387ede5017a9733dfe1c183c /kernel/module/internal.h
parentmodule: Move extra signature support out of core code (diff)
downloadlinux-473c84d1856e83faebf059a52a8e49bdb89026d3.tar.xz
linux-473c84d1856e83faebf059a52a8e49bdb89026d3.zip
module: Move kmemleak support to a separate file
No functional change. This patch migrates kmemleak code out of core module code into kernel/module/debug_kmemleak.c Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Aaron Tomlin <atomlin@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/internal.h')
-rw-r--r--kernel/module/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h
index d6f646a5da41..b0c360839f63 100644
--- a/kernel/module/internal.h
+++ b/kernel/module/internal.h
@@ -167,3 +167,10 @@ static inline int module_sig_check(struct load_info *info, int flags)
return 0;
}
#endif /* !CONFIG_MODULE_SIG */
+
+#ifdef CONFIG_DEBUG_KMEMLEAK
+void kmemleak_load_module(const struct module *mod, const struct load_info *info);
+#else /* !CONFIG_DEBUG_KMEMLEAK */
+static inline void kmemleak_load_module(const struct module *mod,
+ const struct load_info *info) { }
+#endif /* CONFIG_DEBUG_KMEMLEAK */