diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-14 16:30:31 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-18 18:24:33 +0100 |
| commit | 10dde2bd66889f82bb37c16fe441f0ebb1c09c24 (patch) | |
| tree | af9e9475a9da758a204a5c03c870f497dc95c78d /include/linux/module.h | |
| parent | ae324a719289a66197762ee3e78fec5dea144ba7 (diff) | |
| download | linux-next-10dde2bd66889f82bb37c16fe441f0ebb1c09c24.tar.gz linux-next-10dde2bd66889f82bb37c16fe441f0ebb1c09c24.zip | |
module: pull out add_taint_module() to be public
Other kernel code might want to call add_taint_module() so pull it out
and make it global. If modules are not enabled, this defaults to a call
to add_taint(), so all is fine.
Reviewed-by: Johan Hovold <johan@kernel.org>
Tested-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260914-bind_taint-v4-1-eadf8a090903@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 96cc98568eea..f6f90cd88f15 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -29,6 +29,7 @@ #include <linux/srcu.h> #include <linux/static_call_types.h> #include <linux/dynamic_debug.h> +#include <linux/panic.h> #include <linux/percpu.h> #include <asm/module.h> @@ -770,6 +771,9 @@ static inline bool is_livepatch_module(struct module *mod) void module_for_each_mod(int(*func)(struct module *mod, void *data), void *data); +void add_taint_module(struct module *mod, unsigned flag, + enum lockdep_ok lockdep_ok); + #else /* !CONFIG_MODULES... */ static inline struct module *__module_address(unsigned long addr) @@ -877,6 +881,12 @@ static inline bool module_is_coming(struct module *mod) static inline void module_for_each_mod(int(*func)(struct module *mod, void *data), void *data) { } + +static inline void add_taint_module(struct module *mod, unsigned flag, + enum lockdep_ok lockdep_ok) +{ + add_taint(flag, lockdep_ok); +} #endif /* CONFIG_MODULES */ #ifdef CONFIG_SYSFS |
