Skip to content
Snippets Groups Projects
  1. Jul 29, 2009
    • Johannes Berg's avatar
      mac80211: verify info->control.vif is not NULL · a7bc376c
      Johannes Berg authored
      
      When enqueuing packets on the internal packet queue, we
      need to ensure that we have a valid vif pointer since
      that is required since the net namespace work. Add some
      assertions to verify this, but also don't crash is for
      some reason we don't end up with a vif pointer -- warn
      and drop the packet in all these cases.
      
      Since this code touches a number of hotpaths, it is
      intended to be temporary, or maybe configurable in the
      future, at least the bit that is in the path that gets
      hit for every packet, ieee80211_tx_pending().
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a7bc376c
    • Johannes Berg's avatar
      cfg80211: fix disassoc while not associated · f9d6b402
      Johannes Berg authored
      
      When trying to disassociate while not associated,
      the kernel would crash rather than refusing the
      operation, fix this;
      
      Reported-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      f9d6b402
    • Helmut Schaa's avatar
      mac80211: fix an oops in ieee80211_scan_state_set_channel · 0ee9c13c
      Helmut Schaa authored
      
      Fix an oops in ieee80211_scan_state_set_channel which was triggered
      if the last scanned channel was skipped (for example due to regulatory
      restrictions) by returning to the decision state after each skipped
      channel.
      
      Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0ee9c13c
    • Johannes Berg's avatar
      nl80211: add missing parameter clearing · c0b2bbd8
      Johannes Berg authored
      
      Jouni and Maxim reported an oops when using wpa_supplicant -Dnl80211,
      which seems to be due to random data being contained in the crypto
      settings for the assoc() command. This seems to be due to the missing
      memset here, so add it -- it's certainly missing but I'm not 100%
      certain that it will fix the problem.
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c0b2bbd8
    • Johannes Berg's avatar
      mac80211: fix receiving deauth · 8d8b261a
      Johannes Berg authored
      
      Marcel reported a warning, which quite obviously comes
      from an oversight in the code handling deauth frames,
      and which resulted in multiple follow-up warnings due
      to this missing handling. This patch adds the missing
      deauth handling (telling cfg80211 about it) and also
      removes the follow-up warnings since they could happen
      due to races even if nothing is wrong. I've explained
      the races in the comments.
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reported-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Tested-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      8d8b261a
    • Johannes Berg's avatar
      cfg80211: fix circular lock dependency (1) · bc43b28c
      Johannes Berg authored
      
      Luis reported this lockdep complaint, that he had also
      reported earlier but when trying to analyse I had been
      locking at the wrong code, and never saw the problem:
      
      (slightly abridged)
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.31-rc4-wl #6
      -------------------------------------------------------
      wpa_supplicant/3799 is trying to acquire lock:
       (cfg80211_mutex){+.+.+.}, at: [<ffffffffa009246a>] cfg80211_get_dev_from_ifindex+0x1a/0x90 [cfg80211]
      
      but task is already holding lock:
       (rtnl_mutex){+.+.+.}, at: [<ffffffff81400ff2>] rtnl_lock+0x12/0x20
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (rtnl_mutex){+.+.+.}:
             [<ffffffff810857b6>] __lock_acquire+0xd76/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814ee7a4>] mutex_lock_nested+0x44/0x350
             [<ffffffff81400ff2>] rtnl_lock+0x12/0x20
             [<ffffffffa009f6a5>] nl80211_send_reg_change_event+0x1f5/0x2a0 [cfg80211]
             [<ffffffffa009529e>] set_regdom+0x28e/0x4c0 [cfg80211]
      
      -> #0 (cfg80211_mutex){+.+.+.}:
             [<ffffffff8108587b>] __lock_acquire+0xe3b/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814ee7a4>] mutex_lock_nested+0x44/0x350
             [<ffffffffa009246a>] cfg80211_get_dev_from_ifindex+0x1a/0x90 [cfg80211]
             [<ffffffffa009813f>] get_rdev_dev_by_info_ifindex+0x6f/0xa0 [cfg80211]
             [<ffffffffa009b12b>] nl80211_set_interface+0x3b/0x260 [cfg80211]
      
      When looking at the correct code, the problem is quite
      obvious. I'm not entirely sure which code paths lead
      here, so until I can analyse it better let's just use
      RCU to avoid the problem.
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      bc43b28c
  2. Jul 27, 2009
  3. Jul 26, 2009
    • David S. Miller's avatar
      phonet: Fix build. · 421d20a3
      David S. Miller authored
      
      As reported by Oliver Hartkopp:
      
      net/phonet/pn_dev.c: In function ‘phonet_init_net’:
      net/phonet/pn_dev.c:221: error: implicit declaration of function
      ‘proc_net_fops_create’
      net/phonet/pn_dev.c: In function ‘phonet_exit_net’:
      net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      421d20a3
  4. Jul 24, 2009
Loading