1. 18 Nov, 2016 4 commits
    • Johan Hovold's avatar
      net: ethernet: ti: cpsw: fix deferred probe · a4e32b0d
      Johan Hovold authored
      Make sure to deregister all child devices also on probe errors to avoid
      leaks and to fix probe deferral:
      
      cpsw 4a100000.ethernet: omap_device: omap_device_enable() called from invalid state 1
      cpsw 4a100000.ethernet: use pm_runtime_put_sync_suspend() in driver?
      cpsw: probe of 4a100000.ethernet failed with error -22
      
      Add generic helper to undo the effects of cpsw_probe_dt(), which will
      also be used in a follow-on patch to fix further leaks that have been
      introduced more recently.
      
      Note that the platform device is now runtime-resumed before registering
      any child devices in order to make sure that it is synchronously
      suspended after having deregistered the children in the error path.
      
      Fixes: 1fb19aa7 ("net: cpsw: Add parent<->child relation support
      between cpsw and mdio")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4e32b0d
    • Johan Hovold's avatar
      net: ethernet: ti: cpsw: fix mdio device reference leak · 86e1d5ad
      Johan Hovold authored
      Make sure to drop the reference taken by of_find_device_by_node() when
      looking up an mdio device from a phy_id property during probe.
      
      Fixes: 549985ee ("cpsw: simplify the setup of the register
      pointers")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86e1d5ad
    • Johan Hovold's avatar
      net: ethernet: ti: cpsw: fix bad register access in probe error path · c46ab7e0
      Johan Hovold authored
      Make sure to keep the platform device runtime-resumed throughout probe
      to avoid accessing the CPSW registers in the error path (e.g. for
      deferred probe) with clocks disabled:
      
      Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0872d08
      ...
      [<c04fabcc>] (cpsw_ale_control_set) from [<c04fb8b4>] (cpsw_ale_destroy+0x2c/0x44)
      [<c04fb8b4>] (cpsw_ale_destroy) from [<c04fea58>] (cpsw_probe+0xbd0/0x10c4)
      [<c04fea58>] (cpsw_probe) from [<c047b2a0>] (platform_drv_probe+0x5c/0xc0)
      
      Fixes: df828598 ("netdev: driver: ethernet: Add TI CPSW driver")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c46ab7e0
    • Jeremy Linton's avatar
      net: sky2: Fix shutdown crash · 06ba3b21
      Jeremy Linton authored
      The sky2 frequently crashes during machine shutdown with:
      
      sky2_get_stats+0x60/0x3d8 [sky2]
      dev_get_stats+0x68/0xd8
      rtnl_fill_stats+0x54/0x140
      rtnl_fill_ifinfo+0x46c/0xc68
      rtmsg_ifinfo_build_skb+0x7c/0xf0
      rtmsg_ifinfo.part.22+0x3c/0x70
      rtmsg_ifinfo+0x50/0x5c
      netdev_state_change+0x4c/0x58
      linkwatch_do_dev+0x50/0x88
      __linkwatch_run_queue+0x104/0x1a4
      linkwatch_event+0x30/0x3c
      process_one_work+0x140/0x3e0
      worker_thread+0x60/0x44c
      kthread+0xdc/0xf0
      ret_from_fork+0x10/0x50
      
      This is caused by the sky2 being called after it has been shutdown.
      A previous thread about this can be found here:
      
      https://lkml.org/lkml/2016/4/12/410
      
      An alternative fix is to assure that IFF_UP gets cleared by
      calling dev_close() during shutdown. This is similar to what the
      bnx2/tg3/xgene and maybe others are doing to assure that the driver
      isn't being called following _shutdown().
      Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06ba3b21
  2. 17 Nov, 2016 9 commits
  3. 16 Nov, 2016 25 commits
  4. 15 Nov, 2016 1 commit
  5. 14 Nov, 2016 1 commit
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e76d21c4
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix off by one wrt. indexing when dumping /proc/net/route entries,
          from Alexander Duyck.
      
       2) Fix lockdep splats in iwlwifi, from Johannes Berg.
      
       3) Cure panic when inserting certain netfilter rules when NFT_SET_HASH
          is disabled, from Liping Zhang.
      
       4) Memory leak when nft_expr_clone() fails, also from Liping Zhang.
      
       5) Disable UFO when path will apply IPSEC tranformations, from Jakub
          Sitnicki.
      
       6) Don't bogusly double cwnd in dctcp module, from Florian Westphal.
      
       7) skb_checksum_help() should never actually use the value "0" for the
          resulting checksum, that has a special meaning, use CSUM_MANGLED_0
          instead. From Eric Dumazet.
      
       8) Per-tx/rx queue statistic strings are wrong in qed driver, fix from
          Yuval MIntz.
      
       9) Fix SCTP reference counting of associations and transports in
          sctp_diag. From Xin Long.
      
      10) When we hit ip6tunnel_xmit() we could have come from an ipv4 path in
          a previous layer or similar, so explicitly clear the ipv6 control
          block in the skb. From Eli Cooper.
      
      11) Fix bogus sleeping inside of inet_wait_for_connect(), from WANG
          Cong.
      
      12) Correct deivce ID of T6 adapter in cxgb4 driver, from Hariprasad
          Shenai.
      
      13) Fix potential access past the end of the skb page frag array in
          tcp_sendmsg(). From Eric Dumazet.
      
      14) 'skb' can legitimately be NULL in inet{,6}_exact_dif_match(). Fix
          from David Ahern.
      
      15) Don't return an error in tcp_sendmsg() if we wronte any bytes
          successfully, from Eric Dumazet.
      
      16) Extraneous unlocks in netlink_diag_dump(), we removed the locking
          but forgot to purge these unlock calls. From Eric Dumazet.
      
      17) Fix memory leak in error path of __genl_register_family(). We leak
          the attrbuf, from WANG Cong.
      
      18) cgroupstats netlink policy table is mis-sized, from WANG Cong.
      
      19) Several XDP bug fixes in mlx5, from Saeed Mahameed.
      
      20) Fix several device refcount leaks in network drivers, from Johan
          Hovold.
      
      21) icmp6_send() should use skb dst device not skb->dev to determine L3
          routing domain. From David Ahern.
      
      22) ip_vs_genl_family sets maxattr incorrectly, from WANG Cong.
      
      23) We leak new macvlan port in some cases of maclan_common_netlink()
          errors. Fix from Gao Feng.
      
      24) Similar to the icmp6_send() fix, icmp_route_lookup() should
          determine L3 routing domain using skb_dst(skb)->dev not skb->dev.
          Also from David Ahern.
      
      25) Several fixes for route offloading and FIB notification handling in
          mlxsw driver, from Jiri Pirko.
      
      26) Properly cap __skb_flow_dissect()'s return value, from Eric Dumazet.
      
      27) Fix long standing regression in ipv4 redirect handling, wrt.
          validating the new neighbour's reachability. From Stephen Suryaputra
          Lin.
      
      28) If sk_filter() trims the packet excessively, handle it reasonably in
          tcp input instead of exploding. From Eric Dumazet.
      
      29) Fix handling of napi hash state when copying channels in sfc driver,
          from Bert Kenward.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (121 commits)
        mlxsw: spectrum_router: Flush FIB tables during fini
        net: stmmac: Fix lack of link transition for fixed PHYs
        sctp: change sk state only when it has assocs in sctp_shutdown
        bnx2: Wait for in-flight DMA to complete at probe stage
        Revert "bnx2: Reset device during driver initialization"
        ps3_gelic: fix spelling mistake in debug message
        net: ethernet: ixp4xx_eth: fix spelling mistake in debug message
        ibmvnic: Fix size of debugfs name buffer
        ibmvnic: Unmap ibmvnic_statistics structure
        sfc: clear napi_hash state when copying channels
        mlxsw: spectrum_router: Correctly dump neighbour activity
        mlxsw: spectrum: Fix refcount bug on span entries
        bnxt_en: Fix VF virtual link state.
        bnxt_en: Fix ring arithmetic in bnxt_setup_tc().
        Revert "include/uapi/linux/atm_zatm.h: include linux/time.h"
        tcp: take care of truncations done by sk_filter()
        ipv4: use new_gw for redirect neigh lookup
        r8152: Fix error path in open function
        net: bpqether.h: remove if_ether.h guard
        net: __skb_flow_dissect() must cap its return value
        ...
      e76d21c4