svn commit: r248145 - stable/7/sys/netinet
Lawrence Stewart
lstewart at FreeBSD.org
Mon Mar 11 06:17:47 UTC 2013
Author: lstewart
Date: Mon Mar 11 06:17:46 2013
New Revision: 248145
URL: http://svnweb.freebsd.org/changeset/base/248145
Log:
MFC r247906:
The hashmask returned by hashinit() is a valid index in the returned hash array.
Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.
Modified:
stable/7/sys/netinet/siftr.c
Directory Properties:
stable/7/sys/ (props changed)
Modified: stable/7/sys/netinet/siftr.c
==============================================================================
--- stable/7/sys/netinet/siftr.c Mon Mar 11 06:09:08 2013 (r248144)
+++ stable/7/sys/netinet/siftr.c Mon Mar 11 06:17:46 2013 (r248145)
@@ -1316,7 +1316,7 @@ siftr_manage_ops(uint8_t action)
* flow seen and freeing any malloc'd memory.
* The hash consists of an array of LISTs (man 3 queue).
*/
- for (i = 0; i < siftr_hashmask; i++) {
+ for (i = 0; i <= siftr_hashmask; i++) {
LIST_FOREACH_SAFE(counter, counter_hash + i, nodes,
tmp_counter) {
key = counter->key;
More information about the svn-src-stable
mailing list