summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorMarco Pagani <marpagan@redhat.com>2023-12-21 19:58:47 +0300
committerLuis Chamberlain <mcgrof@kernel.org>2023-12-21 21:26:14 +0300
commit4515d08a742c76612b65d2f47a87d12860519842 (patch)
tree6ded247605b964cb1616ec6c96895dd762cade9d /include/linux/module.h
parentf17f2c13d613cbeef529b03ca17ae2581b2e6cb8 (diff)
downloadlinux-4515d08a742c76612b65d2f47a87d12860519842.tar.xz
kernel/module: improve documentation for try_module_get()
The sentence "this call will fail if the module is already being removed" is potentially confusing and may contradict the rest of the documentation. If one tries to get a module that has already been removed using a stale pointer, the kernel will crash. Signed-off-by: Marco Pagani <marpagan@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index a98e188cf37b..08364d5cbc07 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -668,7 +668,7 @@ extern void __module_get(struct module *module);
* @module: the module we should check for
*
* Only try to get a module reference count if the module is not being removed.
- * This call will fail if the module is already being removed.
+ * This call will fail if the module is in the process of being removed.
*
* Care must also be taken to ensure the module exists and is alive prior to
* usage of this call. This can be gauranteed through two means: