lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1342111201-9426-3-git-send-email-paul.gortmaker@windriver.com> Date: Thu, 12 Jul 2012 12:39:55 -0400 From: Paul Gortmaker <paul.gortmaker@...driver.com> To: davem@...emloft.net Cc: netdev@...r.kernel.org, Jon Maloy <jon.maloy@...csson.com>, Erik Hugne <erik.hugne@...csson.com>, ying.xue@...driver.com, Paul Gortmaker <paul.gortmaker@...driver.com> Subject: [PATCH net-next 2/8] 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@...driver.com> --- net/tipc/name_table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 13fb9d5..cade0ac 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; -- 1.7.9.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists