Search Linux Wireless

Re: [RFC] mac80211: Reorder debugfs calls during netdev deinit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> It looks like someone has cleaned up the netdev uninit sequence (which
> was quite a mess at the time I looked at it last and ended up just
> delaying the fix till now..) and that seems to make it trivial to fix
> the deinit order issue.

Yeah, that was me, I mostly rewrote the junk in iface.c.

> ieee80211_free_keys() must be called before
> ieee80211_debugfs_remove_netdev() in order to make sure that the
> possible default_key symlink is removed before the netdev debugfs
> directory is removed.
> 
> This fixes an issue where a monitor interface may be left behind when
> being removed if there is a key symlink in it. This does not happen
> with the current mac80211 code, but could happen in future after IEEE
> 802.11w (management frame protection) is added with its additional
> default_mgmt_key symlink.
> 
> Signed-off-by: Jouni Malinen <jouni.malinen@xxxxxxxxxxx>
> 
> 
> Index: wireless-testing/net/mac80211/iface.c
> ===================================================================
> --- wireless-testing.orig/net/mac80211/iface.c
> +++ wireless-testing/net/mac80211/iface.c
> @@ -31,11 +31,11 @@ static void ieee80211_teardown_sdata(str
>  	int flushed;
>  	int i;
>  
> -	ieee80211_debugfs_remove_netdev(sdata);
> -
>  	/* free extra data */
>  	ieee80211_free_keys(sdata);
>  
> +	ieee80211_debugfs_remove_netdev(sdata);
> +
>  	for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++)
>  		__skb_queue_purge(&sdata->fragments[i].skb_list);
>  	sdata->fragment_next = 0;

Seems sane to me.

Not that I like the workaround of setting keys on the monitor, in fact,
I think it shouldn't be allowed ;)

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux