[PATCH net-next v2 0/2] net: tn40xx: avoid early firmware node release

From
Johan Hovold <johan@kernel.org>
Date
2026-11-16 09:12:37
The tn40xx driver works around a swnode implementation detail and drops
a firmware node reference it has not taken itself.

The first patch avoids releasing the firmware node prematurely if mdio
bus registration ever bails out before taking the reference, and the
second patch cleans up the implementation by switching to using a
primary software node.

This was something I stumbled over when reviewing the software node
implementation and the series has only been compile tested.

Johan


Changes in v2
 - only drop the fwnode reference if it has been taken
 - amend commit message and explain why this does not lead to a UAF
   currently
 - switch to primary software node (2/2, new patch)

 v1: https://lore.kernel.org/all/20261110100051.2567443-1-johan@kernel.org/ (local)


Johan Hovold (2):
  net: tn40xx: avoid early firmware node release
  net: tn40xx: switch to primary software node

 drivers/net/ethernet/tehuti/tn40_mdio.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

-- 
2.56.1
Thread (3 messages) 3 messages, 1 author, last reply 15h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help