Johannes Berg 1d8dc3d3c8 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>
2015-04-24 11:38:12 -04:00
..
2015-02-19 13:31:40 +03:00
2015-04-22 09:24:55 -07:00
2015-03-07 03:23:02 +01:00
2014-12-14 14:57:16 -08:00
2015-03-29 16:17:10 +01:00
2014-11-24 17:24:08 -05:00
2015-04-22 09:18:17 -07:00
2015-04-02 16:25:04 -04:00
2015-02-18 08:01:44 -08:00
2015-02-11 10:28:45 -08:00
2015-04-22 09:04:39 -07:00
2015-01-29 10:49:28 +02:00
2015-04-07 11:17:34 +02:00
2015-03-25 20:28:11 -04:00
2015-04-17 09:03:53 -04:00
2015-04-17 08:31:12 -06:00
2015-03-11 15:56:59 -07:00
2015-04-16 12:33:51 +09:30
2015-02-12 18:54:15 -08:00
2014-12-19 22:55:06 +01:00
2015-01-21 19:21:30 +01:00
2015-03-02 16:43:41 -05:00
2014-12-31 13:06:50 -05:00
2015-04-17 09:04:38 -04:00
2015-02-18 15:08:33 +01:00
2015-03-16 21:45:54 +11:00
2015-04-03 16:18:02 +02:00
2015-01-27 11:09:13 +01:00
2015-04-21 09:42:58 -07:00
2015-04-11 11:17:28 +02:00
2015-01-15 10:34:54 +01:00
2015-01-15 10:34:54 +01:00
2015-02-13 21:21:36 -08:00
2015-02-17 14:34:51 -08:00
2015-01-24 10:11:12 +01:00
2014-12-18 09:39:51 +01:00
2015-01-04 23:11:43 -05:00
2015-04-14 16:49:05 -07:00
2015-03-25 11:44:52 +01:00
2015-04-17 09:04:07 -04:00
2015-03-31 12:04:12 +02:00
2015-03-11 17:56:28 -04:00
2015-04-18 08:30:10 -04:00
2015-04-16 13:53:32 -05:00
2015-04-12 21:03:31 +02:00
2015-01-25 23:17:28 -05:00
2015-02-17 14:34:52 -08:00
2015-01-06 11:01:13 -08:00
2015-02-24 08:44:16 +01:00
2015-03-26 18:18:20 +01:00
2015-04-20 21:57:26 -04:00
2015-02-13 21:21:41 -08:00
2015-03-11 21:55:28 -04:00
2015-04-11 15:53:35 -04:00
2015-01-03 14:32:57 -05:00
2015-04-16 19:02:04 -04:00
2015-02-13 21:21:35 -08:00
2015-03-25 13:28:58 +01:00
2015-04-11 22:29:44 -04:00
2014-11-28 16:08:16 +01:00
2015-04-14 18:06:47 -07:00
2014-12-09 12:05:24 +02:00
2014-12-15 23:49:28 +02:00
2015-03-24 09:48:14 -07:00
2015-04-15 16:35:20 -07:00