]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: Timer should be initialized before device registered
authorVasyl Vavrychuk <vasyl.vavrychuk@globallogic.com>
Wed, 17 Oct 2018 22:02:12 +0000 (01:02 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 9 Nov 2018 07:55:32 +0000 (08:55 +0100)
commitc46e25b3134965e6ae345a56b3bdae72b980cad2
tree5dc6b515811491167255d0bfc43f17cc8714b0bb
parentd1d0f8a2c7788cb302bdf7c98e1967b0ef2ae6bb
mac80211_hwsim: Timer should be initialized before device registered

Otherwise if network manager starts configuring Wi-Fi interface
immidiatelly after getting notification of its creation, we will get
NULL pointer dereference:

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [<ffffffff95ae94c8>] hrtimer_active+0x28/0x50
  ...
  Call Trace:
   [<ffffffff95ae9997>] ? hrtimer_try_to_cancel+0x27/0x110
   [<ffffffff95ae9a95>] ? hrtimer_cancel+0x15/0x20
   [<ffffffffc0803bf0>] ? mac80211_hwsim_config+0x140/0x1c0 [mac80211_hwsim]

Cc: stable@vger.kernel.org
Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@globallogic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c