]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mac80211_hwsim: Timer should be initialized before device registered
authorVasyl Vavrychuk <vasyl.vavrychuk@globallogic.com>
Wed, 17 Apr 2019 08:31:11 +0000 (16:31 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 23 Apr 2019 04:14:46 +0000 (00:14 -0400)
commit4307a5a771d82b23d218e4643e88c1e835273327
treef27d6ad8ab79aef123e65b308f4dee7032b6ad6b
parent7c3434abe3759095395e71168cc1abd0588d2e8e
mac80211_hwsim: Timer should be initialized before device registered

BugLink: https://bugs.launchpad.net/bugs/1825058
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>
(cherry picked from commit a1881c9b8a1edef0a5ae1d5c1b61406fe3402114)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/mac80211_hwsim.c