mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
module: make module_refcount() a signed integer.
James Bottomley points out that it will be -1 during unload. It's only used for diagnostics, so let's not hide that as it could be a clue as to what's gone wrong. Cc: Jason Wessel <jason.wessel@windriver.com> Acked-and-documention-added-by: James Bottomley <James.Bottomley@HansenPartnership.com> Reviewed-by: Masami Hiramatsu <maasami.hiramatsu.pt@hitachi.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c749637909
commit
d5db139ab3
3 changed files with 15 additions and 6 deletions
|
@ -444,7 +444,7 @@ extern void __module_put_and_exit(struct module *mod, long code)
|
|||
#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
|
||||
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
unsigned long module_refcount(struct module *mod);
|
||||
int module_refcount(struct module *mod);
|
||||
void __symbol_put(const char *symbol);
|
||||
#define symbol_put(x) __symbol_put(VMLINUX_SYMBOL_STR(x))
|
||||
void symbol_put_addr(void *addr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue