mac80211_hwsim: avoid NULL access
commit4ff176674e75bdee9022dded415fb805f15700ad
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 7 Jul 2009 01:43:02 +0000 (7 03:43 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Jul 2009 19:24:26 +0000 (8 15:24 -0400)
treed4a103ec06836e07927930c6c86594ca00270a08
parent2fbddeb5c409c90be4706ea2beb7f1fc02100c72
mac80211_hwsim: avoid NULL access

There's a race condition -- started can be set to true
before channel is set due to the way mac80211 callbacks
currently work (->start should probably pass the channel
we would like to have initially). For now simply add a
check to hwsim to avoid dereferencing the NULL channel
pointer.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mac80211_hwsim.c