Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227732
| From | Russell King <rmk+kernel@arm.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/7] phy: fixed-phy: properly validate phy in fixed_phy_update_state() |
| Date | 2015-09-18 12:00 +0200 |
| Message-ID | <qa0Cu-7v5-29@gated-at.bofh.it> (permalink) |
| References | <qa0sO-7jM-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Validate that the phy_device passed into fixed_phy_update_state() is a
fixed-phy device before walking the list of phys for a fixed phy at the
same address.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/net/phy/fixed_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index fb1299c6326e..e23bf5b90e17 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -220,7 +220,7 @@ int fixed_phy_update_state(struct phy_device *phydev,
struct fixed_mdio_bus *fmb = &platform_fmb;
struct fixed_phy *fp;
- if (!phydev || !phydev->bus)
+ if (!phydev || phydev->bus != fmb->mii_bus)
return -EINVAL;
list_for_each_entry(fp, &fmb->phys, node) {
--
2.1.0
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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