Author: lstewart
Date: Mon Mar 11 06:09:08 2013
New Revision: 248144
URL: http://svnweb.freebsd.org/changeset/base/248144

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/9/sys/netinet/siftr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/siftr.c
==============================================================================
--- stable/9/sys/netinet/siftr.c        Mon Mar 11 06:01:00 2013        
(r248143)
+++ stable/9/sys/netinet/siftr.c        Mon Mar 11 06:09:08 2013        
(r248144)
@@ -1313,7 +1313,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;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"

Reply via email to