1. 01 Jul, 2016 6 commits
    • Mohamad Haj Yahia's avatar
      net/mlx5: Avoid calling sleeping function by the health poll thread · c1d4d2e9
      Mohamad Haj Yahia authored
      In internal error state the health poll thread will eventually call
      synchronize_irq() (to safely trigger command completions) which might
      sleep, so we are calling sleeping function from atomic context which is
      invalid.
      Here we move trigger_cmd_completions(dev) to enter error state which is
      the earliest stage in error state handling.
      This way we won't need to wait for next health poll to trigger command
      completions and will solve the scheduling while atomic issue.
      mlx5_enter_error_state can be called from two contexts, protect it with
      dev->intf_state_lock
      
      Fixes: 89d44f0a ('net/mlx5_core: Add pci error handlers to mlx5_core driver')
      Signed-off-by: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1d4d2e9
    • Mohamad Haj Yahia's avatar
      net/mlx5: Fix teardown errors that happen in pci error handler · 0d834442
      Mohamad Haj Yahia authored
      In case of internal error state we will simulate the commands status
      through the return value translation function, but we need to simulate
      all the teardown fw commands as successful so we will not have fw
      command failure prints.
      This also fix memory leaks that happen because we skip teardown stages
      due to failed fw commands.
      
      Fixes: 89d44f0a ('net/mlx5_core: Add pci error handlers to mlx5_core driver')
      Signed-off-by: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d834442
    • Eric Dumazet's avatar
      bonding: prevent out of bound accesses · f87fda00
      Eric Dumazet authored
      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: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Acked-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f87fda00
    • Russell King - ARM Linux's avatar
      net: mvneta: fix open() error cleanup · 3d8c4530
      Russell King - ARM Linux authored
      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: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: default avatarJon Nettleton <jon@solid-run.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d8c4530
    • hayeswang's avatar
      r8152: clear LINK_OFF_WAKE_EN after autoresume · f95ae8a0
      hayeswang authored
      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: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f95ae8a0
    • Sony Chacko's avatar
      qlcnic: add wmb() call in transmit data path. · 9216a97a
      Sony Chacko authored
      Call wmb() to ensure writes are complete before
      hardware fetches updated Tx descriptors.
      Signed-off-by: default avatarSony Chacko <sony.chacko@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9216a97a
  2. 30 Jun, 2016 3 commits
  3. 29 Jun, 2016 31 commits