Re: [PATCH 1/2] mac80211: Use linked list instead of rhashtable walk for mesh tables

Herbert Xu
2019-02-13T13:47:41Z

On Wed, Feb 13, 2019 at 01:16:13PM +0800, Herbert Xu wrote:
> The mesh table code walks over hash tables for two purposes. First of
> all it's used as part of a netlink dump process, but it is also used
> for looking up entries to delete using criteria other than the hash
> key.
>
> The second purpose is directly contrary to the design specification
> of rhashtable walks. It is only meant for use by netlink dumps.
>
> This is because rhashtable is resizable and you cannot obtain a
> stable walk over it during a resize process.
>
> In fact mesh's use of rhashtable for dumping is bogus too. Rather
> than using rhashtable walk's iterator to keep track of the current
> position, it always converts the current position to an integer
> which defeats the purpose of the iterator.
>
> Therefore this patch converts all uses of rhashtable walk into a
> simple linked list.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

OK this patch is broken because there is no locking on the linked
list. I'll repost the series.

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt