summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-30 13:35:23 +0100
committerMark Brown <broonie@kernel.org>2026-09-30 13:35:23 +0100
commite650bf0d64f98b8ea28f99811de7a78e8fc55bb6 (patch)
tree7df444bf9100a44db387e9339a842d5abc0f5343 /kernel
parente33aa711e77b3b62454b357c29f6a109e7dba52e (diff)
parentf1850e443b0e4f2429ddf42a8d5033ea54ae8a90 (diff)
downloadlinux-next-e650bf0d64f98b8ea28f99811de7a78e8fc55bb6.tar.gz
linux-next-e650bf0d64f98b8ea28f99811de7a78e8fc55bb6.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')
-rw-r--r--kernel/module/main.c17
-rw-r--r--kernel/panic.c10
2 files changed, 20 insertions, 7 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c
index c1b34dc1e89a..0d720b33d648 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -191,11 +191,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);
}
/*
diff --git a/kernel/panic.c b/kernel/panic.c
index 170744163fc2..b824b68fcb08 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -825,6 +825,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
TAINT_FLAG(RANDSTRUCT, 'T', ' '),
TAINT_FLAG(TEST, 'N', ' '),
TAINT_FLAG(FWCTL, 'J', ' '),
+ TAINT_FLAG(FORCED_BIND, 'Y', ' '),
};
#undef TAINT_FLAG
@@ -861,9 +862,9 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose)
* exact size is allocated dynamically; the initial buffer remains
* as a fallback if allocation fails.
*
- * The verbose taint string currently requires up to 327 characters.
+ * The verbose taint string currently requires up to 344 characters.
*/
-#define INIT_TAINT_BUF_MAX 350
+#define INIT_TAINT_BUF_MAX 370
static char init_taint_buf[INIT_TAINT_BUF_MAX] __initdata;
static char *taint_buf __refdata = init_taint_buf;
@@ -947,8 +948,9 @@ unsigned long get_taint(void)
* @flag: one of the TAINT_* constants.
* @lockdep_ok: whether lock debugging is still OK.
*
- * If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
- * some notewortht-but-not-corrupting cases, it can be set to true.
+ * 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(unsigned flag, enum lockdep_ok lockdep_ok)
{