1. 03 3月, 2014 1 次提交
  2. 25 2月, 2014 1 次提交
  3. 19 2月, 2014 1 次提交
  4. 06 2月, 2014 4 次提交
    • J
      cfg80211: send scan results from work queue · f9d15d16
      Johannes Berg 提交于
      Due to the previous commit, when a scan finishes, it is in theory
      possible to hit the following sequence:
       1. interface starts being removed
       2. scan is cancelled by driver and cfg80211 is notified
       3. scan done work is scheduled
       4. interface is removed completely, rdev->scan_req is freed,
          event sent to userspace but scan done work remains pending
       5. new scan is requested on another virtual interface
       6. scan done work runs, freeing the still-running scan
      
      To fix this situation, hang on to the scan done message and block
      new scans while that is the case, and only send the message from
      the work function, regardless of whether the scan_req is already
      freed from interface removal. This makes step 5 above impossible
      and changes step 6 to be
       5. scan done work runs, sending the scan done message
      
      As this can't work for wext, so we send the message immediately,
      but this shouldn't be an issue since we still return -EBUSY.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f9d15d16
    • J
      cfg80211: fix scan done race · a617302c
      Johannes Berg 提交于
      When an interface/wdev is removed, any ongoing scan should be
      cancelled by the driver. This will make it call cfg80211, which
      only queues a work struct. If interface/wdev removal is quick
      enough, this can leave the scan request pending and processed
      only after the interface is gone, causing a use-after-free.
      
      Fix this by making sure the scan request is not pending after
      the interface is destroyed. We can't flush or cancel the work
      item due to locking concerns, but when it'll run it shouldn't
      find anything to do. This leaves a potential issue, if a new
      scan gets requested before the work runs, it prematurely stops
      the running scan, potentially causing another crash. I'll fix
      that in the next patch.
      
      This was particularly observed with P2P_DEVICE wdevs, likely
      because freeing them is quicker than freeing netdevs.
      Reported-by: NAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Fixes: 4a58e7c3 ("cfg80211: don't "leak" uncompleted scans")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a617302c
    • J
      cfg80211: re-enable 5/10 MHz support · 5a6aa705
      Johannes Berg 提交于
      Unfortunately I forgot this during the merge window, but the
      patch seems small enough to go in as a fix. The userspace API
      bug that was the reason for disabling it has long been fixed.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5a6aa705
    • P
      nl80211: Reset split_start when netlink skb is exhausted · f12cb289
      Pontus Fuchs 提交于
      When the netlink skb is exhausted split_start is left set. In the
      subsequent retry, with a larger buffer, the dump is continued from the
      failing point instead of from the beginning.
      
      This was causing my rt28xx based USB dongle to now show up when
      running "iw list" with an old iw version without split dump support.
      
      Cc: stable@vger.kernel.org
      Fixes: 3713b4e3 ("nl80211: allow splitting wiphy information in dumps")
      Signed-off-by: NPontus Fuchs <pontus.fuchs@gmail.com>
      [avoid the entire workaround when state->split is set]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f12cb289
  5. 15 1月, 2014 1 次提交
  6. 14 1月, 2014 1 次提交
  7. 10 1月, 2014 1 次提交
  8. 09 1月, 2014 1 次提交
  9. 07 1月, 2014 1 次提交
  10. 06 1月, 2014 1 次提交
  11. 31 12月, 2013 1 次提交
  12. 19 12月, 2013 2 次提交
  13. 16 12月, 2013 2 次提交
  14. 06 12月, 2013 2 次提交
    • E
      cfg80211: don't "leak" uncompleted scans · 4a58e7c3
      Eliad Peller 提交于
      ___cfg80211_scan_done() can be called in some cases
      (e.g. on NETDEV_DOWN) before the low level driver
      notified scan completion (which is indicated by
      passing leak=true).
      
      Clearing rdev->scan_req in this case is buggy, as
      scan_done_wk might have already being queued/running
      (and can't be flushed as it takes rtnl()).
      
      If a new scan will be requested at this stage, the
      scan_done_wk will try freeing it (instead of the
      previous scan), and this will later result in
      a use after free.
      
      Simply remove the "leak" option, and replace it with
      a standard WARN_ON.
      
      An example backtrace after such crash:
      Unable to handle kernel paging request at virtual address fffffee5
      pgd = c0004000
      [fffffee5] *pgd=9fdf6821, *pte=00000000, *ppte=00000000
      Internal error: Oops: 17 [#1] SMP ARM
      PC is at cfg80211_scan_done+0x28/0xc4 [cfg80211]
      LR is at __ieee80211_scan_completed+0xe4/0x2dc [mac80211]
      [<bf0077b0>] (cfg80211_scan_done+0x28/0xc4 [cfg80211])
      [<bf0973d4>] (__ieee80211_scan_completed+0xe4/0x2dc [mac80211])
      [<bf0982cc>] (ieee80211_scan_work+0x94/0x4f0 [mac80211])
      [<c005fd10>] (process_one_work+0x1b0/0x4a8)
      [<c0060404>] (worker_thread+0x138/0x37c)
      [<c0066d70>] (kthread+0xa4/0xb0)
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4a58e7c3
    • B
      cfg80211: stop sched scan only when needed · 24d584d7
      Barak Bercovitz 提交于
      cfg80211_leave stops sched scan when any station vif
      is leaving. Add an explicit check and call it only
      when the relevant vif (the one we scan on) is leaving.
      Signed-off-by: NBarak Bercovitz <barak@wizery.com>
      [Eliad - changed the commit message a bit]
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      [Johannes - add ASSERT_RTNL since that protects the pointer]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      24d584d7
  15. 05 12月, 2013 3 次提交
    • J
      cfg80211: in bitrate_mask, rename mcs to ht_mcs · d1e33e65
      Janusz Dziedzic 提交于
      Rename NL80211_TXRATE_MCS to NL80211_TXRATE_HT and also
      rename mcs to ht_mcs in struct cfg80211_bitrate_mask.
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      [reword commit message]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d1e33e65
    • J
      nl80211: allow setting bitrate mask back to default · b9243ab0
      Janusz Dziedzic 提交于
      Allow setting the bitrate masks back to default by
      omitting the NL80211_ATTR_TX_RATES attribute.
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      [rephrase commit message]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b9243ab0
    • U
      cfg80211: fix WARN_ON for re-association to the expired BSS · 4c4d684a
      Ujjal Roy 提交于
      cfg80211 allows re-association in managed mode and if a user
      wants to re-associate to the same AP network after the time
      period of IEEE80211_SCAN_RESULT_EXPIRE, cfg80211 warns with
      the following message on receiving the connect result event.
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 13984 at net/wireless/sme.c:658
               __cfg80211_connect_result+0x3a6/0x3e0 [cfg80211]()
      Call Trace:
       [<ffffffff81747a41>] dump_stack+0x46/0x58
       [<ffffffff81045847>] warn_slowpath_common+0x87/0xb0
       [<ffffffff81045885>] warn_slowpath_null+0x15/0x20
       [<ffffffffa05345f6>] __cfg80211_connect_result+0x3a6/0x3e0 [cfg80211]
       [<ffffffff8107168b>] ? update_rq_clock+0x2b/0x50
       [<ffffffff81078c01>] ? update_curr+0x1/0x160
       [<ffffffffa05133d2>] cfg80211_process_wdev_events+0xb2/0x1c0 [cfg80211]
       [<ffffffff81079303>] ? pick_next_task_fair+0x63/0x170
       [<ffffffffa0513518>] cfg80211_process_rdev_events+0x38/0x90 [cfg80211]
       [<ffffffffa050f03d>] cfg80211_event_work+0x1d/0x30 [cfg80211]
       [<ffffffff8105f21f>] process_one_work+0x17f/0x420
       [<ffffffff8105f90a>] worker_thread+0x11a/0x370
       [<ffffffff8105f7f0>] ? rescuer_thread+0x2f0/0x2f0
       [<ffffffff8106638b>] kthread+0xbb/0xc0
       [<ffffffff810662d0>] ? kthread_create_on_node+0x120/0x120
       [<ffffffff817574bc>] ret_from_fork+0x7c/0xb0
       [<ffffffff810662d0>] ? kthread_create_on_node+0x120/0x120
      ---[ end trace 61f3bddc9c4981f7 ]---
      
      The reason is that, in connect result event cfg80211 unholds
      the BSS to which the device is associated (and was held so
      far). So, for the event with status successful, when cfg80211
      wants to get that BSS from the device's BSS list it gets a
      NULL BSS because the BSS has been expired and unheld already.
      
      Fix it by reshuffling the code.
      Signed-off-by: NUjjal Roy <royujjal@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4c4d684a
  16. 04 12月, 2013 1 次提交
  17. 03 12月, 2013 5 次提交
  18. 02 12月, 2013 5 次提交
  19. 26 11月, 2013 6 次提交