1. 01 7月, 2016 4 次提交
    • E
      bonding: prevent out of bound accesses · f87fda00
      Eric Dumazet 提交于
      ether_addr_equal_64bits() requires some care about its arguments,
      namely that 8 bytes might be read, even if last 2 byte values are not
      used.
      
      KASan detected a violation with null_mac_addr and lacpdu_mcast_addr
      in bond_3ad.c
      
      Same problem with mac_bcast[] and mac_v6_allmcast[] in bond_alb.c :
      Although the 8-byte alignment was there, KASan would detect out
      of bound accesses.
      
      Fixes: 815117ad ("bonding: use ether_addr_equal_unaligned for bond addr compare")
      Fixes: bb54e589 ("bonding: Verify RX LACPDU has proper dest mac-addr")
      Fixes: 885a136c ("bonding: use compare_ether_addr_64bits() in ALB")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Acked-by: NDmitry Vyukov <dvyukov@google.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f87fda00
    • R
      net: mvneta: fix open() error cleanup · 3d8c4530
      Russell King - ARM Linux 提交于
      If mvneta_mdio_probe() fails, a kernel warning is triggered due to
      missing cleanup in the error path.  Add the necessary cleanup.
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 281 at kernel/irq/manage.c:1814 __free_percpu_irq+0xfc/0x130
      percpu IRQ 38 still enabled on CPU0!
      Modules linked in: bnep bluetooth xhci_plat_hcd xhci_hcd marvell_cesa armada_thermal des_generic ehci_orion mcp3021 spi_orion sfp mdio_i2c evbug fuse
      CPU: 1 PID: 281 Comm: connmand Not tainted 4.7.0-rc2+ #53
      Hardware name: Marvell Armada 380/385 (Device Tree)
      Backtrace:
      [<c0013488>] (dump_backtrace) from [<c00137d0>] (show_stack+0x18/0x1c)
       r6:60010093 r5:ffffffff r4:00000000 r3:dc8ba500
      [<c00137b8>] (show_stack) from [<c02c6fe0>] (dump_stack+0xa4/0xdc)
      [<c02c6f3c>] (dump_stack) from [<c002d4ec>] (__warn+0xd8/0x104)
       r6:c081e6a0 r5:00000000 r4:edfe5d50 r3:dc8ba500
      [<c002d414>] (__warn) from [<c002d5d0>] (warn_slowpath_fmt+0x40/0x48)
       r10:a0010013 r8:c09356f8 r7:00000026 r6:ef11a260 r5:edd7b980 r4:ef11a200
      [<c002d594>] (warn_slowpath_fmt) from [<c008c8e0>] (__free_percpu_irq+0xfc/0x130)
       r3:00000026 r2:c081e7ac
      [<c008c7e4>] (__free_percpu_irq) from [<c008c95c>] (free_percpu_irq+0x48/0x74)
       r10:00008914 r8:00000000 r7:ffffffed r6:c09356f8 r5:00000026 r4:ef11a200
      [<c008c914>] (free_percpu_irq) from [<c043dd70>] (mvneta_open+0x118/0x134)
       r6:ffffffed r5:ef01e640 r4:ef01e000 r3:ef01e000
      [<c043dc58>] (mvneta_open) from [<c055f5b4>] (__dev_open+0xa4/0x108)
       r7:ef01e030 r6:c06ff3d8 r5:ffff9003 r4:ef01e000
      [<c055f510>] (__dev_open) from [<c055f844>] (__dev_change_flags+0x94/0x150)
       r7:00001002 r6:00000001 r5:ffff9003 r4:ef01e000
      [<c055f7b0>] (__dev_change_flags) from [<c055f938>] (dev_change_flags+0x20/0x50)
       r8:00000000 r7:c09334c8 r6:00001002 r5:00000148 r4:ef01e000 r3:00008914
      [<c055f918>] (dev_change_flags) from [<c05de044>] (devinet_ioctl+0x6f4/0x7e0)
       r8:00000000 r7:c09334c8 r6:00000000 r5:ee87200c r4:00000000 r3:00008914
      [<c05dd950>] (devinet_ioctl) from [<c05e0168>] (inet_ioctl+0x1b8/0x1c8)
       r10:beb4499c r9:edfe4000 r8:ecf13280 r7:c096cf00 r6:beb4499c r5:eef7c240
       r4:00008914
      [<c05dffb0>] (inet_ioctl) from [<c053c898>] (sock_ioctl+0x78/0x300)
      [<c053c820>] (sock_ioctl) from [<c0155ecc>] (do_vfs_ioctl+0x98/0xa60)
       r7:00000011 r6:00008914 r5:00000011 r4:c01568d0
      [<c0155e34>] (do_vfs_ioctl) from [<c01568d0>] (SyS_ioctl+0x3c/0x60)
       r10:00000000 r9:edfe4000 r8:beb4499c r7:00000011 r6:00008914 r5:ecf13280
       r4:ecf13280
      [<c0156894>] (SyS_ioctl) from [<c000fe60>] (ret_fast_syscall+0x0/0x1c)
       r8:c0010004 r7:00000036 r6:00000011 r5:000a2978 r4:00000000 r3:00009003
      ---[ end trace 711f625d5b04b3a7 ]---
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: NJon Nettleton <jon@solid-run.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d8c4530
    • H
      r8152: clear LINK_OFF_WAKE_EN after autoresume · f95ae8a0
      hayeswang 提交于
      LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after
      system suspend, the system would wake up when linking off occurs.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f95ae8a0
    • S
      qlcnic: add wmb() call in transmit data path. · 9216a97a
      Sony Chacko 提交于
      Call wmb() to ensure writes are complete before
      hardware fetches updated Tx descriptors.
      Signed-off-by: NSony Chacko <sony.chacko@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9216a97a
  2. 30 6月, 2016 3 次提交
  3. 29 6月, 2016 15 次提交
  4. 28 6月, 2016 5 次提交
    • W
      net/mlx5: use mlx5_buf_alloc_node instead of mlx5_buf_alloc in mlx5_wq_ll_create · f299a02d
      Wang Sheng-Hui 提交于
      Commit 311c7c71 ("net/mlx5e: Allocate DMA coherent memory on
      reader NUMA node") introduced mlx5_*_alloc_node() but missed changing
      some calling and warn messages. This patch introduces 2 changes:
      	* Use mlx5_buf_alloc_node() instead of mlx5_buf_alloc() in
      	  mlx5_wq_ll_create()
      	* Update the failure warn messages with _node postfix for
      	  mlx5_*_alloc function names
      
      Fixes: 311c7c71 ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node")
      Signed-off-by: NWang Sheng-Hui <shhuiw@foxmail.com>
      Acked-By: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f299a02d
    • F
      net: bgmac: Remove superflous netif_carrier_on() · 3894396e
      Florian Fainelli 提交于
      bgmac_open() calls phy_start() to initialize the PHY state machine,
      which will set the interface's carrier state accordingly, no need to
      force that as this could be conflicting with the PHY state determined by
      PHYLIB.
      
      Fixes: dd4544f0 ("bgmac: driver for GBit MAC core on BCMA bus")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3894396e
    • F
      net: bgmac: Start transmit queue in bgmac_open · c3897f2a
      Florian Fainelli 提交于
      The driver does not start the transmit queue in bgmac_open(). If the
      queue was stopped prior to closing then re-opening the interface, we
      would never be able to wake-up again.
      
      Fixes: dd4544f0 ("bgmac: driver for GBit MAC core on BCMA bus")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3897f2a
    • F
      net: bgmac: Fix SOF bit checking · d2b13233
      Florian Fainelli 提交于
      We are checking for the Start of Frame bit in the ctl1 word, while this
      bit is set in the ctl0 word instead. Read the ctl0 word and update the
      check to verify that.
      
      Fixes: 9cde9450 ("bgmac: implement scatter/gather support")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2b13233
    • J
      bonding: fix 802.3ad aggregator reselection · 0622cab0
      Jay Vosburgh 提交于
      Since commit 7bb11dc9 ("bonding: unify all places where
      actor-oper key needs to be updated."), the logic in bonding to handle
      selection between multiple aggregators has not functioned.
      
      	This affects only configurations wherein the bonding slaves
      connect to two discrete aggregators (e.g., two independent switches, each
      with LACP enabled), thus creating two separate aggregation groups within a
      single bond.
      
      	The cause is a change in 7bb11dc9 to no longer set
      AD_PORT_BEGIN on a port after a link state change, which would cause the
      port to be reselected for attachment to an aggregator as if were newly
      added to the bond.  We cannot restore the prior behavior, as it
      contradicts IEEE 802.1AX 5.4.12, which requires ports that "become
      inoperable" (lose carrier, setting port_enabled=false as per 802.1AX
      5.4.7) to remain selected (i.e., assigned to the aggregator).  As the port
      now remains selected, the aggregator selection logic is not invoked.
      
      	A side effect of this change is that aggregators in bonding will
      now contain ports that are link down.  The aggregator selection logic
      does not currently handle this situation correctly, causing incorrect
      aggregator selection.
      
      	This patch makes two changes to repair the aggregator selection
      logic in bonding to function as documented and within the confines of the
      standard:
      
      	First, the aggregator selection and related logic now utilizes the
      number of active ports per aggregator, not the number of selected ports
      (as some selected ports may be down).  The ad_select "bandwidth" and
      "count" options only consider ports that are link up.
      
      	Second, on any carrier state change of any slave, the aggregator
      selection logic is explicitly called to insure the correct aggregator is
      active.
      Reported-by: NVeli-Matti Lintu <veli-matti.lintu@opinsys.fi>
      Fixes: 7bb11dc9 ("bonding: unify all places where actor-oper key needs to be updated.")
      Signed-off-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0622cab0
  5. 27 6月, 2016 1 次提交
  6. 24 6月, 2016 2 次提交
  7. 23 6月, 2016 6 次提交
  8. 20 6月, 2016 4 次提交