diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-21 19:43:14 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-21 19:45:54 -0500 |
commit | d5db139ab3764640e0882a1746e7b9fdee33fd87 (patch) | |
tree | 62f806a29a43c749c84354fbef3bdaa21dc3ce6f /kernel/debug | |
parent | c749637909eea5d4090c6f50b89c2c20b534a280 (diff) |
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>
Diffstat (limited to 'kernel/debug')
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 379650b984f8..2934889f2cce 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -1979,7 +1979,7 @@ static int kdb_lsmod(int argc, const char **argv) | |||
1979 | kdb_printf("%-20s%8u 0x%p ", mod->name, | 1979 | kdb_printf("%-20s%8u 0x%p ", mod->name, |
1980 | mod->core_size, (void *)mod); | 1980 | mod->core_size, (void *)mod); |
1981 | #ifdef CONFIG_MODULE_UNLOAD | 1981 | #ifdef CONFIG_MODULE_UNLOAD |
1982 | kdb_printf("%4ld ", module_refcount(mod)); | 1982 | kdb_printf("%4d ", module_refcount(mod)); |
1983 | #endif | 1983 | #endif |
1984 | if (mod->state == MODULE_STATE_GOING) | 1984 | if (mod->state == MODULE_STATE_GOING) |
1985 | kdb_printf(" (Unloading)"); | 1985 | kdb_printf(" (Unloading)"); |