Skip to content
Commit 1ebebea8 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by John W. Linville
Browse files

mac80211: Fix race between ieee80211_rx_bss_put and lookup routines.



The put routine first decrements the users counter and then
(if it is zero) locks the sta_bss_lock and removes one from
the list and the hash.

Thus, any of ieee80211_sta_config_auth, ieee80211_rx_bss_get
or ieee80211_rx_mesh_bss_get can race with it by finding a
bss that is about to get kfree-ed.

Using atomic_dec_and_lock in ieee80211_rx_bss_put takes care
of this race.

Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d1d8f44a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment