1. 15 12月, 2015 7 次提交
  2. 10 12月, 2015 1 次提交
    • J
      rfkill: copy the name into the rfkill struct · b7bb1100
      Johannes Berg 提交于
      Some users of rfkill, like NFC and cfg80211, use a dynamic name when
      allocating rfkill, in those cases dev_name(). Therefore, the pointer
      passed to rfkill_alloc() might not be valid forever, I specifically
      found the case that the rfkill name was quite obviously an invalid
      pointer (or at least garbage) when the wiphy had been renamed.
      
      Fix this by making a copy of the rfkill name in rfkill_alloc().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b7bb1100
  3. 03 12月, 2015 3 次提交
    • J
      mac80211: fix off-channel mgmt-tx uninitialized variable usage · c1df932c
      Johannes Berg 提交于
      In the last change here, I neglected to update the cookie in one code
      path: when a mgmt-tx has no real cookie sent to userspace as it doesn't
      wait for a response, but is off-channel. The original code used the SKB
      pointer as the cookie and always assigned the cookie to the TX SKB in
      ieee80211_start_roc_work(), but my change turned this around and made
      the code rely on a valid cookie being passed in.
      
      Unfortunately, the off-channel no-wait TX path wasn't assigning one at
      all, resulting in an uninitialized stack value being used. This wasn't
      handed back to userspace as a cookie (since in the no-wait case there
      isn't a cookie), but it was tested for non-zero to distinguish between
      mgmt-tx and off-channel.
      
      Fix this by assigning a dummy non-zero cookie unconditionally, and get
      rid of a misleading comment and some dead code while at it. I'll clean
      up the ACK SKB handling separately later.
      
      Fixes: 3b79af97 ("mac80211: stop using pointers as userspace cookies")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c1df932c
    • A
      mac80211: do not actively scan DFS channels · 4e39ccac
      Antonio Quartulli 提交于
      DFS channels should not be actively scanned as we can't be sure
      if we are allowed or not.
      
      If the current channel is in the DFS band, active scan might be
      performed after CSA, but we have no guarantee about other channels,
      therefore it is safer to prevent active scanning at all.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4e39ccac
    • E
      mac80211: don't teardown sdata on sdata stop · 835112b2
      Eliad Peller 提交于
      Interfaces are being initialized (setup) on addition,
      and torn down on removal.
      
      However, p2p device is being torn down when stopped,
      resulting in the next p2p start operation being done
      on uninitialized interface.
      
      Solve it by calling ieee80211_teardown_sdata() only
      on interface removal (for the non-netdev case).
      Signed-off-by: NEliad Peller <eliadx.peller@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      [squashed in fix to call teardown after unregister]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      835112b2
  4. 20 11月, 2015 2 次提交
  5. 17 11月, 2015 2 次提交
    • J
      mac80211: mesh: fix call_rcu() usage · c2e703a5
      Johannes Berg 提交于
      When using call_rcu(), the called function may be delayed quite
      significantly, and without a matching rcu_barrier() there's no
      way to be sure it has finished.
      Therefore, global state that could be gone/freed/reused should
      never be touched in the callback.
      
      Fix this in mesh by moving the atomic_dec() into the caller;
      that's not really a problem since we already unlinked the path
      and it will be destroyed anyway.
      
      This fixes a crash Jouni observed when running certain tests in
      a certain order, in which the mesh interface was torn down, the
      memory reused for a function pointer (work struct) and running
      that then crashed since the pointer had been decremented by 1,
      resulting in an invalid instruction byte stream.
      
      Cc: stable@vger.kernel.org
      Fixes: eb2b9311 ("mac80211: mesh path table implementation")
      Reported-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c2e703a5
    • J
      mac80211: don't advertise NL80211_FEATURE_FULL_AP_CLIENT_STATE · 45bb780a
      Johannes Berg 提交于
      For now, this feature doesn't actually work. To avoid shipping a
      kernel that has it enabled but where it can't be used disable it
      for now - we can re-enable it when it's fixed.
      
      This partially reverts 44674d9c ("mac80211: advertise support
      for full station state in AP mode").
      
      Cc: Ayala Beker <ayala.beker@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      45bb780a
  6. 16 11月, 2015 25 次提交