cfg80211: fix scheduled scan pointer access
authorJohannes Berg <johannes.berg@intel.com>
Mon, 21 Oct 2013 09:33:35 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:11 +0000 (11:05 -0800)
commit9e2a3e7c5173f2c577f768304df7946de5ab79fc
tree9355bba8ab236bf7ec10894f1689dcab8e72b449
parent722d63201bc55809c4975ea6900d62a732c47bd9
cfg80211: fix scheduled scan pointer access

commit 79845c662eeb95c9a180b9bd0d3ad848ee65b94c upstream.

Since rdev->sched_scan_req is dereferenced outside the
lock protecting it, this might be done at the wrong
time, causing crashes. Move the dereference to where
it should be - inside the RTNL locked section.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/scan.c