Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229668

Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak
Date 2015-09-21 21:10 +0200
Message-ID <qbeDo-7aE-17@gated-at.bofh.it> (permalink)
References <qa0sO-7jM-21@gated-at.bofh.it> <qa0Cu-7v5-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Russell King <rmk+kernel@arm.linux.org.uk>
Date: Fri, 18 Sep 2015 10:54:55 +0100

> Update the comment, and arrange for the only user of this function
> to drop this refcount when disposing of a reference to it.

mdio_mux is not the only user of of_mdio_find_bus(), DSA uses it as
well.

So if anything this commit message is inaccurate.

I also wonder about this refcounting scheme.

If you are going to drop the inner device reference, then we take the
mdio bus returned from of_mdio_find_bus() what holds onto it and keeps
it from disappearing on us?

Don't we have to hold onto some reference count of some kind here?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] Phy and mdiobus fixes Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-18 11:50 +0200
  [PATCH 4/7] of_mdio: fix MDIO phy device refcounting Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  [PATCH 7/7] phy: add phy_device_remove() Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  [PATCH 3/7] phy: add proper phy struct device refcounting Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  [PATCH 5/7] net: fix phy refcounting in a bunch of drivers Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
    Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak David Miller <davem@davemloft.net> - 2015-09-21 21:10 +0200
      Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-21 21:40 +0200
        Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak David Miller <davem@redhat.com> - 2015-09-22 00:10 +0200
  [PATCH 6/7] phy: fixed-phy: properly validate phy in  fixed_phy_update_state() Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  [PATCH 2/7] phy: fix mdiobus module safety Russell King <rmk+kernel@arm.linux.org.uk> - 2015-09-18 12:00 +0200
  Re: [PATCH 0/7] Phy and mdiobus fixes Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-18 12:10 +0200
    Re: [PATCH 0/7] Phy and mdiobus fixes Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-18 17:30 +0200
  Re: [PATCH 0/7] Phy and mdiobus fixes Florian Fainelli <f.fainelli@gmail.com> - 2015-09-19 23:00 +0200

csiph-web