netconsole: fix target enable race and configfs read locking
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected] change-id 20260925-netcons-fixes-93a3e14326b5Versions newest first
- v5 Latest4 patches 4 repliesApplied 4/4
- v43 patches 6 repliesSuperseded
- v32 patches 1 replySuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 2 patches | 1 reply | Superseded | |
| v1 | 4 patches | 3 replies | Superseded |
Changes in v5 from the cover letter
- Add patch 4: netconsole: stop waiting for carrier once the device is unregistered.
- Link to v4: https://patch.msgid.link/[email protected]
Patches in v5 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | netconsole: finish enabling the target before releasing RTNLdrivers/ | +5 | 1 reply | Applied |
| 2/4 | netconsole: read np.dev under target_list_lock in local_mac_show()drivers/ | +16 | 1 reply | Applied |
| 3/4 | netconsole: recheck device registration after waiting for carrierdrivers/ | +10 | 1 reply | Applied |
| 4/4 | netconsole: stop waiting for carrier once the device is unregistereddrivers/ | +2 | 1 reply | Applied |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Breno Leitao |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net v5 0/4] netconsole: fix target enable race and configfs read locking
While looking into the sashiko report about local_ip_show() and remote_ip_show() missing proper locking [1], I noticed a couple other places that need locking:
Patch 1 fixes a null-ptr-deref when enabling a target races against a NETDEV_UNREGISTER event.
Patch 2 fixes a use-after-free when the local_mac_show() callback races against a NETDEV_UNREGISTER event.
Patch 3 fixes yet another race, in netcons_netpoll_setup(), where netconsole could miss the NETDEV_UNREGISTER notification and keep holding a reference to an unregistered device.
[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/[email protected]
---
Changes in v5:
- Add patch 4: netconsole: stop waiting for carrier once the device is unregistered.
- Link to v4: https://patch.msgid.link/[email protected]
Changes in v4:
- Add patch 3: netconsole: fix target enable race and configfs read locking.
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- Use target_list_lock instead of RTNL in local_mac_show.
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Resending for the 'net' tree.
- Link to v1: https://patch.msgid.link/[email protected]
To: Breno Leitao <[email protected]>
To: Andrew Lunn <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Stephen Hemminger <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
Gustavo Luiz Duarte (4):
netconsole: finish enabling the target before releasing RTNL
netconsole: read np.dev under target_list_lock in local_mac_show()
netconsole: recheck device registration after waiting for carrier
netconsole: stop waiting for carrier once the device is unregistered
drivers/net/netconsole.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-)
---
base-commit: 7308ef8b4a6779a39f68d053c19b53a5c584a663
change-id: 20260925-netcons-fixes-93a3e14326b5
Best regards,
Signature · 1 line
Gustavo Luiz Duarte <[email protected]>