1. 19 Jul, 2016 7 commits
  2. 17 Jul, 2016 4 commits
  3. 15 Jul, 2016 14 commits
  4. 14 Jul, 2016 1 commit
    • Beniamino Galvani's avatar
      bonding: set carrier off for devices created through netlink · 005db31d
      Beniamino Galvani authored
      Commit e826eafa ("bonding: Call netif_carrier_off after
      register_netdevice") moved netif_carrier_off() from bond_init() to
      bond_create(), but the latter is called only for initial default
      devices and ones created through sysfs:
      
       $ modprobe bonding
       $ echo +bond1 > /sys/class/net/bonding_masters
       $ ip link add bond2 type bond
       $ grep "MII Status" /proc/net/bonding/*
       /proc/net/bonding/bond0:MII Status: down
       /proc/net/bonding/bond1:MII Status: down
       /proc/net/bonding/bond2:MII Status: up
      
      Ensure that carrier is initially off also for devices created through
      netlink.
      Signed-off-by: default avatarBeniamino Galvani <bgalvani@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      005db31d
  5. 13 Jul, 2016 9 commits
    • David S. Miller's avatar
      Merge branch 'sk_filter-trim-limit' · 790e5ef5
      David S. Miller authored
      Willem de Bruijn says:
      
      ====================
      limit sk_filter trim to payload
      
      Sockets can apply a filter to incoming packets to drop or trim them.
      Fix two codepaths that call skb_pull/__skb_pull after sk_filter
      without checking for packet length.
      
      Reading beyond skb->tail after trimming happens in more codepaths, but
      safety of reading in the linear segment is based on minimum allocation
      size (MAX_HEADER, GRO_MAX_HEAD, ..).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      790e5ef5
    • Willem de Bruijn's avatar
      dccp: limit sk_filter trim to payload · 4f0c40d9
      Willem de Bruijn authored
      Dccp verifies packet integrity, including length, at initial rcv in
      dccp_invalid_packet, later pulls headers in dccp_enqueue_skb.
      
      A call to sk_filter in-between can cause __skb_pull to wrap skb->len.
      skb_copy_datagram_msg interprets this as a negative value, so
      (correctly) fails with EFAULT. The negative length is reported in
      ioctl SIOCINQ or possibly in a DCCP_WARN in dccp_close.
      
      Introduce an sk_receive_skb variant that caps how small a filter
      program can trim packets, and call this in dccp with the header
      length. Excessively trimmed packets are now processed normally and
      queued for reception as 0B payloads.
      
      Fixes: 7c657876 ("[DCCP]: Initial implementation")
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f0c40d9
    • Willem de Bruijn's avatar
      rose: limit sk_filter trim to payload · f4979fce
      Willem de Bruijn authored
      Sockets can have a filter program attached that drops or trims
      incoming packets based on the filter program return value.
      
      Rose requires data packets to have at least ROSE_MIN_LEN bytes. It
      verifies this on arrival in rose_route_frame and unconditionally pulls
      the bytes in rose_recvmsg. The filter can trim packets to below this
      value in-between, causing pull to fail, leaving the partial header at
      the time of skb_copy_datagram_msg.
      
      Place a lower bound on the size to which sk_filter may trim packets
      by introducing sk_filter_trim_cap and call this for rose packets.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4979fce
    • David S. Miller's avatar
      Merge branch 'mlx5-fixes' · 22cb99fb
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5 tx timeout watchdog fixes
      
      This patch set provides two trivial fixes for the tx timeout series lately
      applied into net 4.7.
      
      From Daniel, detect stuck queues due to BQL
      From Mohamad, fix tx timeout watchdog false alarm
      
      Hopefully those two fixes will make it to -stable, assuming
      3947ca18 ('net/mlx5e: Implement ndo_tx_timeout callback') was also backported to -stable.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22cb99fb
    • Mohamad Haj Yahia's avatar
      net/mlx5e: start/stop all tx queues upon open/close netdev · c3b7c5c9
      Mohamad Haj Yahia authored
      Start all tx queues (including inactive ones) when opening the netdev.
      Stop all tx queues (including inactive ones) when closing the netdev.
      
      This is a workaround for the tx timeout watchdog false alarm issue in
      which the netdev watchdog is polling all the tx queues which may include
      inactive queues and thus once lowering the real tx queues number
      (ethtool -L) it will generate tx timeout watchdog false alarms.
      
      Fixes: 3947ca18 ('net/mlx5e: Implement ndo_tx_timeout callback')
      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>
      c3b7c5c9
    • Daniel Jurgens's avatar
      net/mlx5e: Fix TX Timeout to detect queues stuck on BQL · 2c1ccc99
      Daniel Jurgens authored
      Change netif_tx_queue_stopped to netif_xmit_stopped.  This will show
      when queues are stopped due to byte queue limits.
      
      Fixes: 3947ca18 ('net/mlx5e: Implement ndo_tx_timeout callback')
      Signed-off-by: default avatarDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c1ccc99
    • David S. Miller's avatar
      Merge branch 'ethoc-fixes' · ea43f860
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: ethoc: Error path and transmit fixes
      
      This patch series contains two patches for the ethoc driver while testing on a
      TS-7300 board where ethoc is provided by an on-board FPGA.
      
      First patch was cooked after chasing crashes with invalid resources passed to
      the driver.
      
      Second patch was cooked after seeing that an interface configured with IP
      192.168.2.2 was sending ARP packets for 192.168.0.0, no wonder why it could not
      work.
      
      I don't have access to any other platform using an ethoc interface so
      it could be good to some testing on Xtensa for instance.
      
      Changes in v3:
      
      - corrected the error path if skb_put_padto() fails, thanks to Max
        for spotting this!
      
      Changes in v2:
      
      - fixed the first commit message
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ea43f860
    • Florian Fainelli's avatar
      net: ethoc: Correctly pad short packets · ee6c21b9
      Florian Fainelli authored
      Even though the hardware can be doing zero padding, we want the SKB to
      be going out on the wire with the appropriate size. This fixes packet
      truncations observed with e.g: ARP packets.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee6c21b9
    • Florian Fainelli's avatar
      net: ethoc: Fix early error paths · 386512d1
      Florian Fainelli authored
      In case any operation fails before we can successfully go the point
      where we would register a MDIO bus, we would be going to an error label
      which involves unregistering then freeing this yet to be created MDIO
      bus. Update all error paths to go to label free which is the only one
      valid until either the clock is enabled, or the MDIO bus is allocated
      and registered. This fixes kernel oops observed while trying to
      dereference the MDIO bus structure which is not yet allocated.
      
      Fixes: a1702857 ("net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      386512d1
  6. 12 Jul, 2016 5 commits