Thread (19 messages) 19 messages, 8 authors, 4d ago
COOLING4d

[PATCH v4 2/3] module: fix up documentation for add_taint() and add_taint_module()

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2026-09-14 14:30:58
Also in: driver-core, linux-doc, linux-trace-kernel, linux-usb, lkml
Subsystem: module support, the rest · Maintainers: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen, Linus Torvalds

When add_taint_module() was added, the documentation for it was copied
directly from add_taint().  But that documentation was a bit wrong
(wrong variable name, and misleading boolean reference.)  Fix up both
functions to have the correct documentation for how to use the
lockdep_ok parameter to these functions.

Reported-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/module/main.c | 5 +++--
 kernel/panic.c       | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 444d990c9983..369794876c3e 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -197,8 +197,9 @@ static inline int strong_try_module_get(struct module *mod)
  * @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 noteworthy-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_module(struct module *mod, unsigned flag,
 		      enum lockdep_ok lockdep_ok)
diff --git a/kernel/panic.c b/kernel/panic.c
index 213725b612aa..892045d8409e 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -948,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)
 {
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help