net: phy: fix a second attach of an attached PHY and the module put on detach
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest2 patches 1 replyApplied 2/2
- v54 patches 5 repliesSuperseded
- v44 patches 1 replySuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 4 patches | 2 replies | Superseded |
Changes in v6 from the cover letter
https://lore.kernel.org/netdev/[email protected]/
- Dropped patches 3 and 4 (the bind_lock and the unbind wait), as Andrew suggested: unbinding a PHY driver is a development tool and not worth that complexity.
- Dropped the Fixes tags, the series targets net-next.
- Patch 2: added Andrew's Reviewed-by.
Patches in v6 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: phy: refuse a second attach before touching the PHYdrivers/ | +7 | 1 reply | Applied |
| 2/2 | net: phy: put the driver module the attach tookdrivers/ include/ | +10 | 0 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Andrew Lunn |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v6 0/2] net: phy: fix a second attach of an attached PHY and the module put on detach
Two phylib fixes found on a Keenetic KN-1012 (MT7981) while chasing a PHY driver unbind race. A second attach of an attached PHY tears down the first consumer, and a detach after a driver unbind leaks the module reference.
1: refuse a second attach before the driver module is taken or the
generic driver bound.
2: put the module the attach pinned, not whatever driver is bound at
detach.
Patch 1 goes first: with patch 2 alone, the second attach error path leaves the first consumer's module reference pinned.
Changes in v6 (since v5):
https://lore.kernel.org/netdev/[email protected]/
- Dropped patches 3 and 4 (the bind_lock and the unbind wait), as Andrew suggested: unbinding a PHY driver is a development tool and not worth that complexity.
- Dropped the Fixes tags, the series targets net-next.
- Patch 2: added Andrew's Reviewed-by.
Aleksei Sviridkin (2):
net: phy: refuse a second attach before touching the PHY
net: phy: put the driver module the attach took
drivers/net/phy/phy_device.c | 25 +++++++++++++++---------- include/linux/phy.h | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-)
Signature · 1 line
2.53.0