1. 11 Jun, 2017 17 commits
  2. 10 Jun, 2017 13 commits
  3. 09 Jun, 2017 10 commits
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.12-20170609' of... · f6d4c713
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.12-20170609' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2017-06-09
      
      this is a pull request of 6 patches for net/master.
      
      There's a patch by Stephane Grosjean that fixes an uninitialized symbol warning
      in the peak_canfd driver. A patch by Johan Hovold to fix the product-id
      endianness in an error message in the the peak_usb driver. A patch by Oliver
      Hartkopp to enable CAN FD for virtual CAN devices by default. Three patches by
      me, one makes the helper function can_change_state() robust to be called with
      cf == NULL. The next patch fixes a memory leak in the gs_usb driver. And the
      last one fixes a lockdep splat by properly initialize the per-net
      can_rcvlists_lock spin_lock.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6d4c713
    • Johannes Berg's avatar
      mac80211: free netdev on dev_alloc_name() error · c7a61cba
      Johannes Berg authored
      The change to remove free_netdev() from ieee80211_if_free()
      erroneously didn't add the necessary free_netdev() for when
      ieee80211_if_free() is called directly in one place, rather
      than as the priv_destructor. Add the missing call.
      
      Fixes: cf124db5 ("net: Fix inconsistent teardown and release of private netdev state.")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7a61cba
    • ashwanth@codeaurora.org's avatar
      net: rps: send out pending IPI's on CPU hotplug · 773fc8f6
      ashwanth@codeaurora.org authored
      IPI's from the victim cpu are not handled in dev_cpu_callback.
      So these pending IPI's would be sent to the remote cpu only when
      NET_RX is scheduled on the victim cpu and since this trigger is
      unpredictable it would result in packet latencies on the remote cpu.
      
      This patch add support to send the pending ipi's of victim cpu.
      Signed-off-by: default avatarAshwanth Goli <ashwanth@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      773fc8f6
    • Mario Molitor's avatar
      stmmac: fix for hw timestamp of GMAC3 unit · 33d4c482
      Mario Molitor authored
      1.) Bugfix of function stmmac_get_tx_hwtstamp.
          Corrected the tx timestamp available check (same as 4.8 and older)
          Change printout from info syslevel to debug.
      
      2.) Bugfix of function stmmac_get_rx_hwtstamp.
          Corrected the rx timestamp available check (same as 4.8 and older)
          Change printout from info syslevel to debug.
      
      Fixes: ba1ffd74 ("stmmac: fix PTP support for GMAC4")
      Signed-off-by: default avatarMario Molitor <mario_molitor@web.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33d4c482
    • Mario Molitor's avatar
      stmmac: fix ptp header for GMAC3 hw timestamp · fd6720ae
      Mario Molitor authored
      According the CYCLON V documention only the bit 16 of snaptypesel should
      set.
      (more information see Table 17-20 (cv_5v4.pdf) :
       Timestamp Snapshot Dependency on Register Bits)
      
      Fixes: d2042052 ("stmmac: update the PTP header file")
      Signed-off-by: default avatarMario Molitor <mario_molitor@web.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd6720ae
    • Krister Johansen's avatar
      Fix an intermittent pr_emerg warning about lo becoming free. · f186ce61
      Krister Johansen authored
      It looks like this:
      
      Message from syslogd@flamingo at Apr 26 00:45:00 ...
       kernel:unregister_netdevice: waiting for lo to become free. Usage count = 4
      
      They seem to coincide with net namespace teardown.
      
      The message is emitted by netdev_wait_allrefs().
      
      Forced a kdump in netdev_run_todo, but found that the refcount on the lo
      device was already 0 at the time we got to the panic.
      
      Used bcc to check the blocking in netdev_run_todo.  The only places
      where we're off cpu there are in the rcu_barrier() and msleep() calls.
      That behavior is expected.  The msleep time coincides with the amount of
      time we spend waiting for the refcount to reach zero; the rcu_barrier()
      wait times are not excessive.
      
      After looking through the list of callbacks that the netdevice notifiers
      invoke in this path, it appears that the dst_dev_event is the most
      interesting.  The dst_ifdown path places a hold on the loopback_dev as
      part of releasing the dev associated with the original dst cache entry.
      Most of our notifier callbacks are straight-forward, but this one a)
      looks complex, and b) places a hold on the network interface in
      question.
      
      I constructed a new bcc script that watches various events in the
      liftime of a dst cache entry.  Note that dst_ifdown will take a hold on
      the loopback device until the invalidated dst entry gets freed.
      
      [      __dst_free] on DST: ffff883ccabb7900 IF tap1008300eth0 invoked at 1282115677036183
          __dst_free
          rcu_nocb_kthread
          kthread
          ret_from_fork
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f186ce61
    • Mateusz Jurczyk's avatar
      af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers · defbcf2d
      Mateusz Jurczyk authored
      Verify that the caller-provided sockaddr structure is large enough to
      contain the sa_family field, before accessing it in bind() and connect()
      handlers of the AF_UNIX socket. Since neither syscall enforces a minimum
      size of the corresponding memory region, very short sockaddrs (zero or
      one byte long) result in operating on uninitialized memory while
      referencing .sa_family.
      Signed-off-by: default avatarMateusz Jurczyk <mjurczyk@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      defbcf2d
    • Joe Perches's avatar
      net: phy: add missing SPEED_14000 · fc5b775d
      Joe Perches authored
      Fixes: 0d7e2d21 ("IB/ipoib: add get_link_ksettings in ethtool")
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc5b775d
    • Oliver Hartkopp's avatar
      can: enable CAN FD for virtual CAN devices by default · 97edec3a
      Oliver Hartkopp authored
      CAN FD capable CAN interfaces can handle (classic) CAN 2.0 frames too.
      New users usually fail at their first attempt to explore CAN FD on
      virtual CAN interfaces due to the current CAN_MTU default.
      
      Set the MTU to CANFD_MTU by default to reduce this confusion.
      If someone *really* needs a 'classic CAN'-only device this can be set
      with the 'ip' tool with e.g. 'ip link set vcan0 mtu 16' as before.
      Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      97edec3a
    • Marc Kleine-Budde's avatar
      can: af_can: namespace support: fix lockdep splat: properly initialize spin_lock · 74b7b490
      Marc Kleine-Budde authored
      This patch uses spin_lock_init() instead of __SPIN_LOCK_UNLOCKED() to
      initialize the per namespace net->can.can_rcvlists_lock lock to fix this
      lockdep warning:
      
      | INFO: trying to register non-static key.
      | the code is fine but needs lockdep annotation.
      | turning off the locking correctness validator.
      | CPU: 0 PID: 186 Comm: candump Not tainted 4.12.0-rc3+ #47
      | Hardware name: Marvell Kirkwood (Flattened Device Tree)
      | [<c0016644>] (unwind_backtrace) from [<c00139a8>] (show_stack+0x18/0x1c)
      | [<c00139a8>] (show_stack) from [<c0058c8c>] (register_lock_class+0x1e4/0x55c)
      | [<c0058c8c>] (register_lock_class) from [<c005bdfc>] (__lock_acquire+0x148/0x1990)
      | [<c005bdfc>] (__lock_acquire) from [<c005deec>] (lock_acquire+0x174/0x210)
      | [<c005deec>] (lock_acquire) from [<c04a6780>] (_raw_spin_lock+0x50/0x88)
      | [<c04a6780>] (_raw_spin_lock) from [<bf02116c>] (can_rx_register+0x94/0x15c [can])
      | [<bf02116c>] (can_rx_register [can]) from [<bf02a868>] (raw_enable_filters+0x60/0xc0 [can_raw])
      | [<bf02a868>] (raw_enable_filters [can_raw]) from [<bf02ac14>] (raw_enable_allfilters+0x2c/0xa0 [can_raw])
      | [<bf02ac14>] (raw_enable_allfilters [can_raw]) from [<bf02ad38>] (raw_bind+0xb0/0x250 [can_raw])
      | [<bf02ad38>] (raw_bind [can_raw]) from [<c03b5fb8>] (SyS_bind+0x70/0xac)
      | [<c03b5fb8>] (SyS_bind) from [<c000f8c0>] (ret_fast_syscall+0x0/0x1c)
      
      Cc: Mario Kicherer <dev@kicherer.org>
      Acked-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      74b7b490