mbox series

[v2,0/4] mac80211: Fix incorrect usage of rhashtable walk API

Message ID 20190213143853.labj6zdcsoupkris@gondor.apana.org.au (mailing list archive)
Headers show
Series mac80211: Fix incorrect usage of rhashtable walk API | expand

Message

Herbert Xu Feb. 13, 2019, 2:38 p.m. UTC
Hi:

The first two patches in this series are bug fixes and should be
backported to stable.

They fixes a number of issues with the use of the rhashtable API
in mac80211.  First of all it converts the use of rashtable walks over
to a simple linked list.  This is because an rhashtable walk is
inherently unstable and not meant for uses that require stability,
e.g., when you're trying to lookup an object to delete.

It also fixes a potential memory leak when the rhashtable insertion
fails (which can occur due to OOM).

The third patch is a code-cleanup to mac80211 while the last patch
removes an obsolete rhashtable API.

Thanks,

Comments

Johannes Berg Feb. 13, 2019, 2:55 p.m. UTC | #1
On Wed, 2019-02-13 at 22:38 +0800, Herbert Xu wrote:
> Hi:
> 
> The first two patches in this series are bug fixes and should be
> backported to stable.
> 
> They fixes a number of issues with the use of the rhashtable API
> in mac80211.  First of all it converts the use of rashtable walks over
> to a simple linked list.  This is because an rhashtable walk is
> inherently unstable and not meant for uses that require stability,
> e.g., when you're trying to lookup an object to delete.
> 
> It also fixes a potential memory leak when the rhashtable insertion
> fails (which can occur due to OOM).

Thanks a lot Herbert! That looks simpler than I thought it would be.

johannes