Skip to content
  1. May 23, 2017
    • WANG Cong's avatar
      vsock: use new wait API for vsock_stream_sendmsg() · 499fde66
      WANG Cong authored
      
      
      As reported by Michal, vsock_stream_sendmsg() could still
      sleep at vsock_stream_has_space() after prepare_to_wait():
      
        vsock_stream_has_space
          vmci_transport_stream_has_space
            vmci_qpair_produce_free_space
              qp_lock
                qp_acquire_queue_mutex
                  mutex_lock
      
      Just switch to the new wait API like we did for commit
      d9dc8b0f ("net: fix sleeping for sk_wait_event()").
      
      Reported-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Cc: Jorgen Hansen <jhansen@vmware.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      499fde66
    • Jarod Wilson's avatar
      bonding: fix randomly populated arp target array · 72ccc471
      Jarod Wilson authored
      
      
      In commit dc9c4d0f, the arp_target array moved from a static global
      to a local variable. By the nature of static globals, the array used to
      be initialized to all 0. At present, it's full of random data, which
      that gets interpreted as arp_target values, when none have actually been
      specified. Systems end up booting with spew along these lines:
      
      [   32.161783] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.168475] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.175089] 8021q: adding VLAN 0 to HW filter on device lacp0
      [   32.193091] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.204892] lacp0: Setting MII monitoring interval to 100
      [   32.211071] lacp0: Removing ARP target 216.124.228.17
      [   32.216824] lacp0: Removing ARP target 218.160.255.255
      [   32.222646] lacp0: Removing ARP target 185.170.136.184
      [   32.228496] lacp0: invalid ARP target 255.255.255.255 specified for removal
      [   32.236294] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
      [   32.243987] lacp0: Removing ARP target 56.125.228.17
      [   32.249625] lacp0: Removing ARP target 218.160.255.255
      [   32.255432] lacp0: Removing ARP target 15.157.233.184
      [   32.261165] lacp0: invalid ARP target 255.255.255.255 specified for removal
      [   32.268939] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
      [   32.276632] lacp0: Removing ARP target 16.0.0.0
      [   32.281755] lacp0: Removing ARP target 218.160.255.255
      [   32.287567] lacp0: Removing ARP target 72.125.228.17
      [   32.293165] lacp0: Removing ARP target 218.160.255.255
      [   32.298970] lacp0: Removing ARP target 8.125.228.17
      [   32.304458] lacp0: Removing ARP target 218.160.255.255
      
      None of these were actually specified as ARP targets, and the driver does
      seem to clean up the mess okay, but it's rather noisy and confusing, leaks
      values to userspace, and the 255.255.255.255 spew shows up even when debug
      prints are disabled.
      
      The fix: just zero out arp_target at init time.
      
      While we're in here, init arp_all_targets_value in the right place.
      
      Fixes: dc9c4d0f ("bonding: reduce scope of some global variables")
      CC: Mahesh Bandewar <maheshb@google.com>
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: netdev@vger.kernel.org
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Acked-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72ccc471
    • David S. Miller's avatar
      net: Make IP alignment calulations clearer. · e4eda884
      David S. Miller authored
      
      
      The assignmnet:
      
      	ip_align = strict ? 2 : NET_IP_ALIGN;
      
      in compare_pkt_ptr_alignment() trips up Coverity because we can only
      get to this code when strict is true, therefore ip_align will always
      be 2 regardless of NET_IP_ALIGN's value.
      
      So just assign directly to '2' and explain the situation in the
      comment above.
      
      Reported-by: default avatar"Gustavo A. R. Silva" <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4eda884
    • Jarod Wilson's avatar
      bonding: fix accounting of active ports in 3ad · 751da2a6
      Jarod Wilson authored
      
      
      As of 7bb11dc9 and 0622cab0, bond slaves in a 3ad bond are not
      removed from the aggregator when they are down, and the active slave count
      is NOT equal to number of ports in the aggregator, but rather the number
      of ports in the aggregator that are still enabled. The sysfs spew for
      bonding_show_ad_num_ports() has a comment that says "Show number of active
      802.3ad ports.", but it's currently showing total number of ports, both
      active and inactive. Remedy it by using the same logic introduced in
      0622cab0 in __bond_3ad_get_active_agg_info(), so sysfs, procfs and
      netlink all report the number of active ports. Note that this means that
      IFLA_BOND_AD_INFO_NUM_PORTS really means NUM_ACTIVE_PORTS instead of
      NUM_PORTS, and thus perhaps should be renamed for clarity.
      
      Lightly tested on a dual i40e lacp bond, simulating link downs with an ip
      link set dev <slave2> down, was able to produce the state where I could
      see both in the same aggregator, but a number of ports count of 1.
      
      MII Status: up
      Active Aggregator Info:
              Aggregator ID: 1
              Number of ports: 2 <---
      Slave Interface: ens10
      MII Status: up <---
      Aggregator ID: 1
      Slave Interface: ens11
      MII Status: up
      Aggregator ID: 1
      
      MII Status: up
      Active Aggregator Info:
              Aggregator ID: 1
              Number of ports: 1 <---
      Slave Interface: ens10
      MII Status: down <---
      Aggregator ID: 1
      Slave Interface: ens11
      MII Status: up
      Aggregator ID: 1
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: netdev@vger.kernel.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      751da2a6
    • Alexey Khoroshilov's avatar
      net: atheros: atl2: don't return zero on failure path in atl2_probe() · bd703a15
      Alexey Khoroshilov authored
      
      
      If dma mask checks fail in atl2_probe(), it breaks off initialization,
      deallocates all resources, but returns zero.
      
      The patch adds proper error code return value and
      make error code setup unified.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd703a15
  2. May 22, 2017
  3. May 19, 2017
    • Linus Torvalds's avatar
      Merge tag 'md/4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 8b4822de
      Linus Torvalds authored
      Pull MD fixes from Shaohua Li:
      
       - Several bug fixes for raid5-cache from Song Liu, mainly handle
         journal disk error
      
       - Fix bad block handling in choosing raid1 disk from Tomasz Majchrzak
      
       - Simplify external metadata array sysfs handling from Artur
         Paszkiewicz
      
       - Optimize raid0 discard handling from me, now raid0 will dispatch
         large discard IO directly to underlayer disks.
      
      * tag 'md/4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        raid1: prefer disk without bad blocks
        md/r5cache: handle sync with data in write back cache
        md/r5cache: gracefully handle journal device errors for writeback mode
        md/raid1/10: avoid unnecessary locking
        md/raid5-cache: in r5l_do_submit_io(), submit io->split_bio first
        md/md0: optimize raid0 discard handling
        md: don't return -EAGAIN in md_allow_write for external metadata arrays
        md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock
      8b4822de
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 667f867c
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Don't allow negative TCP reordering values, from Soheil Hassas
          Yeganeh.
      
       2) Don't overflow while parsing ipv6 header options, from Craig Gallek.
      
       3) Handle more cleanly the case where an individual route entry during
          a dump will not fit into the allocated netlink SKB, from David
          Ahern.
      
       4) Add missing CONFIG_INET dependency for mlx5e, from Arnd Bergmann.
      
       5) Allow neighbour updates to converge more quickly via gratuitous
          ARPs, from Ihar Hrachyshka.
      
       6) Fix compile error from CONFIG_INET is disabled, from Eric Dumazet.
      
       7) Fix use after free in x25 protocol init, from Lin Zhang.
      
       8) Valid VLAN pvid ranges passed into br_validate(), from Tobias
          Jungel.
      
       9) NULL out address lists in child sockets in SCTP, this is similar to
          the fix we made for inet connection sockets last week. From Eric
          Dumazet.
      
      10) Fix NULL deref in mlxsw driver, from Ido Schimmel.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        mlxsw: spectrum: Avoid possible NULL pointer dereference
        sh_eth: Do not print an error message for probe deferral
        sh_eth: Use platform device for printing before register_netdev()
        mlxsw: spectrum_router: Fix rif counter freeing routine
        mlxsw: spectrum_dpipe: Fix incorrect entry index
        cxgb4: update latest firmware version supported
        qmi_wwan: add another Lenovo EM74xx device ID
        sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
        udp: make *udp*_queue_rcv_skb() functions static
        bridge: netlink: check vlan_default_pvid range
        net: ethernet: faraday: To support device tree usage.
        net: x25: fix one potential use-after-free issue
        bpf: adjust verifier heuristics
        ipv6: Check ip6_find_1stfragopt() return value properly.
        selftests/bpf: fix broken build due to types.h
        bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST.
        bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration.
        net: fix compile error in skb_orphan_partial()
        ipv6: Prevent overrun when parsing v6 header options
        neighbour: update neigh timestamps iff update is effective
        ...
      667f867c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · a58a260f
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Three sparc bug fixes"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc/ftrace: Fix ftrace graph time measurement
        sparc: Fix -Wstringop-overflow warning
        sparc64: Fix mapping of 64k pages with MAP_FIXED
      a58a260f
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.12' of... · 5396a018
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fix from Masahiro Yamada:
       "Fix headers_install to not delete pre-existing headers in the install
        destination"
      
      * tag 'kbuild-fixes-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: skip install/check of headers right under uapi directories
      5396a018
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · 16d95c43
      Linus Torvalds authored
      Pull pid namespace fixes from Eric Biederman:
       "These are two bugs that turn out to have simple fixes that were
        reported during the merge window. Both of these issues have existed
        for a while and it just happens that they both were reported at almost
        the same time"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()
        pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
      16d95c43
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.12-rc2' of... · af5d2856
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fix from Guenter Roeck:
       "Fix problem with hotplug state machine in coretemp driver"
      
      * tag 'hwmon-for-linus-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (coretemp) Handle frozen hotplug state correctly
      af5d2856
  4. May 18, 2017