Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: tn40xx: avoid early firmware node release
@ 2026-11-16  9:11 Johan Hovold
  2026-11-16  9:11 ` [PATCH net-next v2 1/2] " Johan Hovold
  2026-11-16  9:11 ` [PATCH net-next v2 2/2] net: tn40xx: switch to primary software node Johan Hovold
  0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2026-11-16  9:11 UTC (permalink / raw)
  To: FUJITA Tomonori, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, Johan Hovold

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/


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-16  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16  9:11 [PATCH net-next v2 0/2] net: tn40xx: avoid early firmware node release Johan Hovold
2026-11-16  9:11 ` [PATCH net-next v2 1/2] " Johan Hovold
2026-11-16  9:11 ` [PATCH net-next v2 2/2] net: tn40xx: switch to primary software node Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox