Skip to content

Commit 4515d08

Browse files
Marco Paganimcgrof
authored andcommitted
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>
1 parent f17f2c1 commit 4515d08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ extern void __module_get(struct module *module);
668668
* @module: the module we should check for
669669
*
670670
* Only try to get a module reference count if the module is not being removed.
671-
* This call will fail if the module is already being removed.
671+
* This call will fail if the module is in the process of being removed.
672672
*
673673
* Care must also be taken to ensure the module exists and is alive prior to
674674
* usage of this call. This can be gauranteed through two means:

0 commit comments

Comments
 (0)