mbox series

[0/3] mac80211_hwsim: radio destruction fixes

Message ID 20180925074115.18169-1-martin@strongswan.org
Headers show
Series mac80211_hwsim: radio destruction fixes | expand

Message

Martin Willi Sept. 25, 2018, 7:41 a.m. UTC
This small series fixes two issues for cleaning up hwsim radios. The
first one is rather easy to hit when terminating namespaces with many
hwsim radios. The second one affects destroy-on-close users only.

Given that the use of a work-queue for deferred cleanup with namespaces
has been and still is tricky to get right, this series switches these
users to a synchronous cleanup in hwsim; The removal of that work-queue
is in a dedicated commit in case we want to skip that in backports.

Martin Willi (3):
  mac80211_hwsim: fix locking when iterating radios during ns exit
  mac80211_hwsim: fix race in radio destruction from netlink notifier
  mac80211_hwsim: drop now unused work-queue from hwsim

 drivers/net/wireless/mac80211_hwsim.c | 44 +++++++++++----------------
 1 file changed, 17 insertions(+), 27 deletions(-)

Comments

Johannes Berg Sept. 25, 2018, 7:44 a.m. UTC | #1
On Tue, 2018-09-25 at 09:41 +0200, Martin Willi wrote:
> This small series fixes two issues for cleaning up hwsim radios. The
> first one is rather easy to hit when terminating namespaces with many
> hwsim radios. The second one affects destroy-on-close users only.
> 
> Given that the use of a work-queue for deferred cleanup with namespaces
> has been and still is tricky to get right, this series switches these
> users to a synchronous cleanup in hwsim;

Cool, thanks. I wasn't really even aware of this, most our usage is with
VMs, not namespaces.

> The removal of that work-queue
> is in a dedicated commit in case we want to skip that in backports.

Yeah, also I'll probably stick that into -next only.

johannes
Benjamin Beichler Sept. 25, 2018, 6 p.m. UTC | #2
Am 25.09.2018 um 09:41 schrieb Martin Willi:
> This small series fixes two issues for cleaning up hwsim radios. The
> first one is rather easy to hit when terminating namespaces with many
> hwsim radios. The second one affects destroy-on-close users only.
>
> Given that the use of a work-queue for deferred cleanup with namespaces
> has been and still is tricky to get right, this series switches these
> users to a synchronous cleanup in hwsim; The removal of that work-queue
> is in a dedicated commit in case we want to skip that in backports.

Indeed, this is a much better solution. I wasn't that happy with the
workqueue thing, but I didn't know a better solution :-)

I see no errors at review, but I currently cannot test it quickly.

> Martin Willi (3):
>   mac80211_hwsim: fix locking when iterating radios during ns exit
>   mac80211_hwsim: fix race in radio destruction from netlink notifier
>   mac80211_hwsim: drop now unused work-queue from hwsim
>
>  drivers/net/wireless/mac80211_hwsim.c | 44 +++++++++++----------------
>  1 file changed, 17 insertions(+), 27 deletions(-)
>
kind regards

Benjamin