[PATCH net v2 0/2] netconsole: fix target enable race and configfs read locking

From: Gustavo Luiz Duarte

Date: Tue Oct 06 2026 - 14:22:46 EST


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/2 fixes a null-ptr-deref when enabling
a target races against a NETDEV_UNREGISTER event, and patch 2/2 fixes a
use-after-free when the local_mac_show() callback races against a
NETDEV_UNREGISTER event.

[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260814-netcons_ipv6-v3-7-bc0915e8c75f@xxxxxxxxx

Signed-off-by: Gustavo Luiz Duarte <gustavold@xxxxxxxxx>
---
Changes in v2:
- Resending for the 'net' tree.
- Link to v1: https://patch.msgid.link/20260928-netcons-fixes-v1-0-bb5ffe5e698a@xxxxxxxxx

To: Breno Leitao <leitao@xxxxxxxxxx>
To: Andrew Lunn <andrew+netdev@xxxxxxx>
To: "David S. Miller" <davem@xxxxxxxxxxxxx>
To: Eric Dumazet <edumazet@xxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
To: Paolo Abeni <pabeni@xxxxxxxxxx>
To: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Gustavo Luiz Duarte (2):
netconsole: finish enabling the target before releasing RTNL
netconsole: read np.dev under the RTNL in local_mac_show()

drivers/net/netconsole.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
---
base-commit: d5a007b9b457c915ab1a53227e8939e4018aa97a
change-id: 20260925-netcons-fixes-93a3e14326b5

Best regards,
--
Gustavo Luiz Duarte <gustavold@xxxxxxxxx>