1. 11 12月, 2016 10 次提交
  2. 10 12月, 2016 20 次提交
  3. 09 12月, 2016 10 次提交
    • J
      cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts · e6f462df
      Johannes Berg 提交于
      When mac80211 abandons an association attempt, it may free
      all the data structures, but inform cfg80211 and userspace
      about it only by sending the deauth frame it received, in
      which case cfg80211 has no link to the BSS struct that was
      used and will not cfg80211_unhold_bss() it.
      
      Fix this by providing a way to inform cfg80211 of this with
      the BSS entry passed, so that it can clean up properly, and
      use this ability in the appropriate places in mac80211.
      
      This isn't ideal: some code is more or less duplicated and
      tracing is missing. However, it's a fairly small change and
      it's thus easier to backport - cleanups can come later.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e6f462df
    • V
      nl80211: Use different attrs for BSSID and random MAC addr in scan req · 2fa436b3
      Vamsi Krishna 提交于
      NL80211_ATTR_MAC was used to set both the specific BSSID to be scanned
      and the random MAC address to be used when privacy is enabled. When both
      the features are enabled, both the BSSID and the local MAC address were
      getting same value causing Probe Request frames to go with unintended
      DA. Hence, this has been fixed by using a different NL80211_ATTR_BSSID
      attribute to set the specific BSSID (which was the more recent addition
      in cfg80211) for a scan.
      
      Backwards compatibility with old userspace software is maintained to
      some extent by allowing NL80211_ATTR_MAC to be used to set the specific
      BSSID when scanning without enabling random MAC address use.
      
      Scanning with random source MAC address was introduced by commit
      ad2b26ab ("cfg80211: allow drivers to support random MAC addresses
      for scan") and the issue was introduced with the addition of the second
      user for the same attribute in commit 818965d3 ("cfg80211: Allow a
      scan request for a specific BSSID").
      
      Fixes: 818965d3 ("cfg80211: Allow a scan request for a specific BSSID")
      Signed-off-by: NVamsi Krishna <vamsin@qti.qualcomm.com>
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2fa436b3
    • J
      nl80211: fix logic inversion in start_nan() · eeb04a96
      Johannes Berg 提交于
      Arend inadvertently inverted the logic while converting to
      wdev_running(), fix that.
      
      Fixes: 73c7da3d ("cfg80211: add generic helper to check interface is running")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      eeb04a96
    • A
      net: xgene: avoid bogus maybe-uninitialized warning · f006b2c5
      Arnd Bergmann 提交于
      In some configurations, gcc cannot trace the state of variables
      across a spin_unlock() barrier, leading to a warning about
      correct code:
      
      xgene_enet_main.c: In function 'xgene_enet_start_xmit':
      ../../../phy/mdio-xgene.h:112:14: error: 'mss_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      Here we can trivially move the assignment before that spin_unlock,
      which reliably avoids the warning.
      
      Fixes: e3978673 ("drivers: net: xgene: Fix MSS programming")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f006b2c5
    • A
      net: xgene: move xgene_cle_ptree_ewdn data off stack · dece303f
      Arnd Bergmann 提交于
      The array for initializing the cle is set up on the stack with
      almost entirely constant data and then passed to a function that
      converts it into HW specific bit patterns. With the latest
      addition, the size of this array has grown to the point that
      we get a warning about potential stack overflow in allmodconfig
      builds:
      
      xgene_enet_cle.c: In function ‘xgene_enet_cle_init’:
      xgene_enet_cle.c:836:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      Looking a bit deeper at the usage, I noticed that the only modification
      of the data is in dead code, as we don't even use the cle module
      for phy_mode other than PHY_INTERFACE_MODE_XGMII. This means we
      can simply mark the structure constant and access it directly rather
      than passing the pointer down through another structure, making
      the code more efficient at the same time as avoiding the
      warning.
      
      Fixes: a809701f ("drivers: net: xgene: fix: RSS for non-TCP/UDP")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dece303f
    • A
      net/mlx5e: use %pad format string for dma_addr_t · 9afd8952
      Arnd Bergmann 提交于
      On 32-bit ARM with 64-bit dma_addr_t I get this warning about an
      incorrect format string:
      
      In file included from /git/arm-soc/drivers/net/ethernet/mellanox/mlx5/core/alloc.c:42:0:
      drivers/net/ethernet/mellanox/mlx5/core/alloc.c: In function ‘mlx5_frag_buf_alloc_node’:
      drivers/net/ethernet/mellanox/mlx5/core/alloc.c:134:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      
      We have the special %pad format for printing dma_addr_t, so use that
      to print the correct address and avoid the warning.
      
      Fixes: 1c1b5228 ("net/mlx5e: Implement Fragmented Work Queue (WQ)")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9afd8952
    • D
      Merge branch 'ethernet-missing-netdev-parent' · 1472d599
      David S. Miller 提交于
      Florian Fainelli says:
      
      ====================
      net: ethernet: Make sure we set dev->dev.parent
      
      This patch series builds atop:
      
      ec988ad7 ("phy: Don't increment MDIO
      bus refcount unless it's a different owner")
      
      FMAN is the one that potentially needs patching as well (call
      SET_NETDEV_DEV), but there appears to be no way that init_phy is
      called right now, or there is not such an in-tree user. Madalin, can
      you comment on that?
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1472d599
    • F
      net: ethernet: cpmac: Call SET_NETDEV_DEV() · 5579f28c
      Florian Fainelli 提交于
      The TI CPMAC driver calls into PHYLIB which now checks for
      net_device->dev.parent, so make sure we do set it before calling into
      any MDIO/PHYLIB related function.
      
      Fixes: ec988ad7 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5579f28c
    • F
      net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() · 9cecb138
      Florian Fainelli 提交于
      The Lantiq Etop driver calls into PHYLIB which now checks for
      net_device->dev.parent, so make sure we do set it before calling into
      any MDIO/PHYLIB related function.
      
      Fixes: ec988ad7 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9cecb138
    • P
      vhost-vsock: fix orphan connection reset · c4587631
      Peng Tao 提交于
      local_addr.svm_cid is host cid. We should check guest cid instead,
      which is remote_addr.svm_cid. Otherwise we end up resetting all
      connections to all guests.
      
      Cc: stable@vger.kernel.org [4.8+]
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPeng Tao <bergwolf@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4587631