From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
maowenan <maowenan@huawei.com>,
andrew@lunn.ch, rmk+kernel@armlinux.org.uk, festevam@gmail.com,
davem@davemloft.net, nikita.yoush@cogentembedded.com
Subject: [PATCH net v3 0/3] net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
Date: Wed, 8 Feb 2017 16:13:58 -0800 [thread overview]
Message-ID: <20170209001401.2564-1-f.fainelli@gmail.com> (raw)
Hi all,
This patch series addresses the crash seen with the Generic PHY driver
in phy_attach_direct() introduced in the latest pull to Linus.
We also address how to properly bind and unbind to/from the PHY drivers which
would previously be crashing in flames since we did not stop the state machine.
Thanks!
Changes in v3:
- made more testing as module/built-in, with Generic and non-Generic PHY drivers
- exercised error paths on purpose by injecting errors
- properly incremenet Generic PHY module reference count as well
- fixed the error path to be correct
Changes in v2:
- fixed net: phy: Fix lack of reference count on PHY driver against
the Generic PHY driver which is special
Florian Fainelli (3):
net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
net: phy: Check phydev->drv
net: phy: Fix PHY driver bind and unbind events
drivers/net/phy/phy.c | 26 +++++++++++++++++++++----
drivers/net/phy/phy_device.c | 45 ++++++++++++++++++++++++++++++++++++++++----
include/linux/phy.h | 3 +++
3 files changed, 66 insertions(+), 8 deletions(-)
--
2.9.3
next reply other threads:[~2017-02-09 0:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 0:13 Florian Fainelli [this message]
2017-02-09 0:13 ` [PATCH net v3 1/3] net: phy: Fix PHY module checks and NULL deref in phy_attach_direct() Florian Fainelli
2017-02-09 0:15 ` Florian Fainelli
2017-02-09 6:58 ` [net, v3, " Heiko Schocher
2017-02-09 7:13 ` Florian Fainelli
2017-02-09 7:29 ` Heiko Schocher
2017-02-09 0:14 ` [PATCH net v3 2/3] net: phy: Check phydev->drv Florian Fainelli
2017-02-09 0:14 ` [PATCH net v3 3/3] net: phy: Fix PHY driver bind and unbind events Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170209001401.2564-1-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=festevam@gmail.com \
--cc=maowenan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).