Search Linux Wireless

Re: [PATCH] mac80211: simplify key locking

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

 



On Mon, Jul 26, 2010 at 09:42:58AM +0200, Johannes Berg wrote:
> On Sun, 2010-07-25 at 18:39 -0700, Jouni Malinen wrote:
> > -	ieee80211_key_disable_hw_accel(key);
> > +	if (key->local)
> > +		ieee80211_key_disable_hw_accel(key);
> 
>  
> > -	ieee80211_debugfs_key_remove(key);
> > +	if (key->local)
> > +		ieee80211_debugfs_key_remove(key);
> 
> These might look odd, but they're fine on a key that hasn't been used
> since it couldn't have been uploaded to hardware, or put into debugfs,
> so they'll just exit right away.

Well, the latter one may indeed do that since debugfs_remove_recursive()
survives NULL pointer. However, the former one does not.
ieee80211_key_disable_hw_accel() has a key->local dereference and it
oopses without the "if (key->local)" part here (before checking whether
the key is uploaded to hardware). I started first making that handle
unlinked keys, but since this gets called before
ieee80211_key_enable_hw_accel() in the problem case, it looked more
logical to fix the caller not to get to the disable function in the
first place.

-- 
Jouni Malinen                                            PGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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