]> git.baikalelectronics.ru Git - kernel.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)
commita9c68a4cbec0105f75e1cfa5d54f4af76e2a47b5
treed4a103ec06836e07927930c6c86594ca00270a08
parent6283b31b6b4e2d4654673fca3b9281ad685e5f0e
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