]> git.openfabrics.org - ~emulex/infiniband.git/commit
mac80211_hwsim: avoid NULL access
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 7 Jul 2009 01:43:02 +0000 (03:43 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Jul 2009 19:24:26 +0000 (15:24 -0400)
commit4ff176674e75bdee9022dded415fb805f15700ad
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