1. 07 2月, 2017 4 次提交
  2. 31 1月, 2017 2 次提交
  3. 30 1月, 2017 6 次提交
  4. 27 1月, 2017 4 次提交
  5. 26 1月, 2017 1 次提交
  6. 25 1月, 2017 2 次提交
  7. 24 1月, 2017 1 次提交
    • F
      net: dsa: Check return value of phy_connect_direct() · 4078b76c
      Florian Fainelli 提交于
      We need to check the return value of phy_connect_direct() in
      dsa_slave_phy_connect() otherwise we may be continuing the
      initialization of a slave network device with a PHY that already
      attached somewhere else and which will soon be in error because the PHY
      device is in error.
      
      The conditions for such an error to occur are that we have a port of our
      switch that is not disabled, and has the same port number as a PHY
      address (say both 5) that can be probed using the DSA slave MII bus. We
      end-up having this slave network device find a PHY at the same address
      as our port number, and we try to attach to it.
      
      A slave network (e.g: port 0) has already attached to our PHY device,
      and we try to re-attach it with a different network device, but since we
      ignore the error we would end-up initializating incorrect device
      references by the time the slave network interface is opened.
      
      The code has been (re)organized several times, making it hard to provide
      an exact Fixes tag, this is a bugfix nonetheless.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4078b76c
  8. 21 1月, 2017 1 次提交
  9. 19 1月, 2017 2 次提交
  10. 11 1月, 2017 4 次提交
  11. 10 1月, 2017 3 次提交
  12. 08 1月, 2017 1 次提交
  13. 07 1月, 2017 1 次提交
  14. 06 1月, 2017 1 次提交
  15. 05 1月, 2017 1 次提交
  16. 30 12月, 2016 1 次提交
  17. 30 11月, 2016 3 次提交
  18. 29 11月, 2016 1 次提交
    • N
      net: dsa: fix unbalanced dsa_switch_tree reference counting · 7a99cd6e
      Nikita Yushchenko 提交于
      _dsa_register_switch() gets a dsa_switch_tree object either via
      dsa_get_dst() or via dsa_add_dst(). Former path does not increase kref
      in returned object (resulting into caller not owning a reference),
      while later path does create a new object (resulting into caller owning
      a reference).
      
      The rest of _dsa_register_switch() assumes that it owns a reference, and
      calls dsa_put_dst().
      
      This causes a memory breakage if first switch in the tree initialized
      successfully, but second failed to initialize. In particular, freed
      dsa_swith_tree object is left referenced by switch that was initialized,
      and later access to sysfs attributes of that switch cause OOPS.
      
      To fix, need to add kref_get() call to dsa_get_dst().
      
      Fixes: 83c0afae ("net: dsa: Add new binding implementation")
      Signed-off-by: NNikita Yushchenko <nikita.yoush@cogentembedded.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a99cd6e
  19. 28 11月, 2016 1 次提交