Commit 4515d08a authored by Marco Pagani's avatar Marco Pagani Committed by Luis Chamberlain

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: default avatarMarco Pagani <marpagan@redhat.com>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent f17f2c13
...@@ -668,7 +668,7 @@ extern void __module_get(struct module *module); ...@@ -668,7 +668,7 @@ extern void __module_get(struct module *module);
* @module: the module we should check for * @module: the module we should check for
* *
* Only try to get a module reference count if the module is not being removed. * 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 * 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: * usage of this call. This can be gauranteed through two means:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment