path: root/net/dccp/ipv4.c
diff options
authorJohannes Berg <johannes.berg@intel.com>2015-04-23 16:38:43 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-24 11:38:12 -0400
commit1d8dc3d3c8f1d8ee1da9d54c5d7c8694419ade42 (patch)
tree8fee42496cb0eccbd5f48d406fa219aa017229b0 /net/dccp/ipv4.c
parentbgmac: fix requests for extra polling calls from NAPI (diff)
rhashtable: don't attempt to grow when at max_size
The conversion of mac80211's station table to rhashtable had a bug that I found by accident in code review, that hadn't been found as rhashtable apparently managed to have a maximum hash chain length of one (!) in all our testing. In order to test the bug and verify the fix I set my rhashtable's max_size very low (4) in order to force getting hash collisions. At that point, rhashtable WARNed in rhashtable_insert_rehash() but didn't actually reject the hash table insertion. This caused it to lose insertions - my master list of stations would have 9 entries, but the rhashtable only had 5. This may warrant a deeper look, but that WARN_ON() just shouldn't happen. Fix this by not returning true from rht_grow_above_100() when the rhashtable's max_size has been reached - in this case the user is explicitly configuring it to be at most that big, so even if it's now above 100% it shouldn't attempt to resize. This fixes the "lost insertion" issue and consequently allows my code to display its error (and verify my fix for it.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv4.c')
0 files changed, 0 insertions, 0 deletions