netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Buggy rhashtable walking
@ 2016-08-04  7:18 Herbert Xu
       [not found] ` <20160804071846.GA773-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
  0 siblings, 1 reply; 38+ messages in thread
From: Herbert Xu @ 2016-08-04  7:18 UTC (permalink / raw)
  To: David S. Miller, netdev-u79uwXL29TY76Z2rM5mHXA, Johannes Berg,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Hi:

While working on rhashtable I noticed that wireless is walking
rhashtables by hand using rht_for_each_*.  You must not do that
as an rhashtable can entail multiple hash tables when resizing.
If you walk it by hand then you may end up missing entries.

The correct way to do it is to use the rhashtable walk interface.
However, even this comes with the caveat that a given entry may
show up multiple times.  So if you cannot handle that then you
must construct your own data structure outside of rhashtable, like
we do in IPsec.

So the question is can wireless handle seeing an entry multiple
times? In particular, __ieee80211_rx_handle_packet would appear
to process the same packet multiple times if this were to happen.

Cheers,
-- 
Email: Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2016-09-20  8:44 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04  7:18 Buggy rhashtable walking Herbert Xu
     [not found] ` <20160804071846.GA773-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2016-08-04  7:45   ` Herbert Xu
2016-08-05  6:16     ` Johannes Berg
     [not found]       ` <1470377813.2977.14.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-08-05 10:48         ` Herbert Xu
2016-08-05 10:50           ` Johannes Berg
2016-08-05 11:46             ` Ben Greear
     [not found]               ` <57A47CA3.4010101-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2016-08-08 15:26                 ` Herbert Xu
     [not found]             ` <1470394233.2977.37.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-18 13:50               ` [PATCH 0/2] rhashtable: rhashtable with duplicate objects Herbert Xu
2016-09-18 13:53                 ` [PATCH 1/2] rhashtable: Add rhlist interface Herbert Xu
2016-09-18 13:54                 ` [PATCH 2/2] mac80211: Use rhltable instead of rhashtable Herbert Xu
2016-09-19  8:20                 ` [PATCH 0/2] rhashtable: rhashtable with duplicate objects Johannes Berg
2016-09-19  8:25                   ` Johannes Berg
     [not found]                     ` <1474273518.4469.8.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19  8:35                       ` Herbert Xu
2016-09-19  8:58                         ` Johannes Berg
2016-09-19  8:40                 ` [v2 PATCH " Herbert Xu
2016-09-19  8:42                   ` [v2 PATCH 1/2] rhashtable: Add rhlist interface Herbert Xu
2016-09-19  8:42                   ` [v2 PATCH 2/2] mac80211: Use rhltable instead of rhashtable Herbert Xu
2016-09-19  9:15                   ` [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects Johannes Berg
     [not found]                     ` <1474276530.4469.16.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19  9:17                       ` Herbert Xu
2016-09-19  9:27                         ` Johannes Berg
2016-09-19  9:31                           ` Johannes Berg
     [not found]                           ` <1474277244.4469.21.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19  9:34                             ` Herbert Xu
     [not found]                               ` <20160919093434.GA12378-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2016-09-19  9:38                                 ` Johannes Berg
2016-09-19  9:50                               ` Johannes Berg
     [not found]                                 ` <1474278634.4469.25.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19  9:54                                   ` Johannes Berg
     [not found]                                     ` <1474278896.4469.26.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19 10:02                                       ` Johannes Berg
     [not found]                                         ` <1474279330.4469.28.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19 10:04                                           ` Johannes Berg
     [not found]                                             ` <1474279492.4469.29.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19 10:10                                               ` Johannes Berg
2016-09-19 10:48                                                 ` Herbert Xu
     [not found]                                                   ` <20160919104801.GA12774-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2016-09-19 10:58                                                     ` Johannes Berg
     [not found]                   ` <20160919084056.GA11875-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2016-09-19 10:58                     ` [v3 " Herbert Xu
2016-09-19 11:00                       ` [v3 PATCH 1/2] rhashtable: Add rhlist interface Herbert Xu
2016-09-19 21:16                         ` Thomas Graf
2016-09-20  1:52                           ` Herbert Xu
2016-09-19 11:00                       ` [v3 PATCH 2/2] mac80211: Use rhltable instead of rhashtable Herbert Xu
2016-09-19 11:03                       ` [v3 PATCH 0/2] rhashtable: rhashtable with duplicate objects Johannes Berg
     [not found]                         ` <1474283023.6544.0.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-19 11:32                           ` Johannes Berg
     [not found]                             ` <1474284732.6544.2.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-09-20  8:44                               ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).