Search Linux Wireless

Re: [PATCHv5] mac80211: fix NULL pointer dereference in ieee80211_compatible_rates

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

 



> static void ieee80211_rx_bss_put(struct net_device *dev,
>                                  struct ieee80211_sta_bss *bss)
> {
>         struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> 
>         local_bh_disable();
>         if (!atomic_dec_and_lock(&bss->users, &local->sta_bss_lock)) {
>                 local_bh_enable();
>                 return;
>         }
> 
> ---- don't we miss  local_bh_enable(); here or spin_unlock_bh takes
> care of this ---
> 
> 
>         __ieee80211_rx_bss_hash_del(dev, bss);
>         list_del(&bss->list);
>         spin_unlock_bh(&local->sta_bss_lock);

spin_unlock_bh takes care of it. The local_bh_disable() +
atomic_dec_and_lock() is like spin_lock_bh() + atomic_dec() just with
different atomicity guarantees.

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