diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-07-11 17:35:01 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-07-12 10:13:12 -0400 |
commit | f705ab956b3a0377181c9d73b235ad5bf4020937 (patch) | |
tree | b54d99b3f945160120c6d5d57e31fed2e93b3829 /net/tipc | |
parent | 7e9cab58e8e0b5e52af28145ffa70de329adc459 (diff) | |
download | blackbird-op-linux-f705ab956b3a0377181c9d73b235ad5bf4020937.tar.gz blackbird-op-linux-f705ab956b3a0377181c9d73b235ad5bf4020937.zip |
tipc: limit error messages relating to memory leak to one line
With the default name table size of 1024, it is possible that
the sanity check in tipc_nametbl_stop could spam out 1024
essentially identical error messages if memory was corrupted
or similar. Limit it to issuing no more than a single message.
The actual chain number (i.e. 0 --> 1023) wouldn't provide any
useful insight if/when such an instance happened, so don't
bother printing out that value.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/name_table.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 13fb9d559ea5..cade0acda4ef 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -940,8 +940,10 @@ void tipc_nametbl_stop(void) /* Verify name table is empty, then release it */ write_lock_bh(&tipc_nametbl_lock); for (i = 0; i < tipc_nametbl_size; i++) { - if (!hlist_empty(&table.types[i])) - err("tipc_nametbl_stop(): hash chain %u is non-null\n", i); + if (hlist_empty(&table.types[i])) + continue; + err("tipc_nametbl_stop(): orphaned hash chain detected\n"); + break; } kfree(table.types); table.types = NULL; |