diff options
| author | Mark Brown <broonie@kernel.org> | 2026-10-09 23:05:59 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-09 23:05:59 +0200 |
| commit | 0d384f281b18d8f3cd8fe8d8dccdeac4a94d1042 (patch) | |
| tree | a3034a4a0daa8c57a530fa60f048b3756b842a1e /kernel/module | |
| parent | ef71df2329d27980db07b84b4714518e862f1689 (diff) | |
| parent | 7db73c69c8311bfe72b3acbd6807d57cd755bdc7 (diff) | |
| download | linux-next-0d384f281b18d8f3cd8fe8d8dccdeac4a94d1042.tar.gz linux-next-0d384f281b18d8f3cd8fe8d8dccdeac4a94d1042.zip | |
Merge branch 'driver-core-next' of https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
Diffstat (limited to 'kernel/module')
| -rw-r--r-- | kernel/module/main.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c index 91c4a507a38b..4752777e5bef 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -192,11 +192,22 @@ static inline int strong_try_module_get(struct module *mod) return -ENOENT; } -static inline void add_taint_module(struct module *mod, unsigned flag, - enum lockdep_ok lockdep_ok) +/** + * add_taint_module: add a taint flag if not already set for a specific module + * @mod: pointer to the module that caused the problem + * @flag: one of the TAINT_* constants. + * @lockdep_ok: whether lock debugging is still OK. + * + * If something bad has gone wrong, you'll want + * @lockdep_ok = LOCKDEP_NOW_UNRELIABLE, but for some + * noteworthy-but-not-corrupting cases, it can be set to LOCKDEP_STILL_OK. + */ +void add_taint_module(struct module *mod, unsigned flag, + enum lockdep_ok lockdep_ok) { add_taint(flag, lockdep_ok); - set_bit(flag, &mod->taints); + if (mod) + set_bit(flag, &mod->taints); } /* |
