Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/4] net: wan: fix FSL UCC HDLC lifecycle bugs
@ 2026-09-10 23:54 Myeonghun Pak
  2026-09-10 23:54 ` [PATCH net v3 1/4] net: wan: fsl_ucc_hdlc: validate protocol before starting device Myeonghun Pak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-10 23:54 UTC (permalink / raw)
  To: Zhao Qiang
  Cc: Krzysztof Halasa, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Alexandra Diupina,
	Christophe Leroy, Ijae Kim, netdev, linuxppc-dev, linux-kernel

This issue was identified during our ongoing static-analysis research while
reviewing kernel code.

The v2 review found two pre-existing FSL UCC HDLC bugs and asked that
the generic HDLC behavior change be separated and audited.

Patch 1 validates that an HDLC protocol is attached before starting the
UCC, avoiding a NULL protocol dereference on a premature interface open.
Patch 2 allocates the suspend backup before disabling NAPI, so allocation
failure leaves the running interface usable. Patch 3 closes active HDLC
devices before detaching their protocol and documents the audit of every
current caller, including the farsync probe unwind. Patch 4 unregisters
and frees the FSL UCC HDLC netdev before its private resources.

Patch 4 depends on patch 3 to stop an active device while its protocol is
still attached and before UCC and DMA resources are released.

These fixes and changelogs were prepared with an LLM and then checked
against the cited source paths and call ordering.

Changes since v2:
- split the generic unregister_hdlc_device() change into its own patch;
- audit all eight in-tree HDLC hardware drivers and document farsync;
- fix the NULL protocol dereference reported in uhdlc_open();
- keep NAPI enabled when the suspend backup allocation fails;
- rebase the series onto Linux 7.3-rc1.

v2: https://lore.kernel.org/r/20260803133048.42650-1-mhun512@gmail.com
review: https://lore.kernel.org/r/20260806020541.2011936-2-kuba@kernel.org

Validation:
The series applies cleanly to net commit 784450234395.
All four patches pass strict checkpatch.
No hardware runtime testing was performed.

Myeonghun Pak (4):
  net: wan: fsl_ucc_hdlc: validate protocol before starting device
  net: wan: fsl_ucc_hdlc: allocate suspend backup before quiescing
  net: wan: hdlc: close active devices before protocol detach
  net: wan: fsl_ucc_hdlc: release HDLC device on remove

 drivers/net/wan/fsl_ucc_hdlc.c | 29 ++++++++++++++++-------------
 drivers/net/wan/hdlc.c         |  1 +
 2 files changed, 17 insertions(+), 13 deletions(-)


base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
-- 
2.47.1

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

end of thread, other threads:[~2026-09-10 23:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 23:54 [PATCH net v3 0/4] net: wan: fix FSL UCC HDLC lifecycle bugs Myeonghun Pak
2026-09-10 23:54 ` [PATCH net v3 1/4] net: wan: fsl_ucc_hdlc: validate protocol before starting device Myeonghun Pak
2026-09-10 23:54 ` [PATCH net v3 2/4] net: wan: fsl_ucc_hdlc: allocate suspend backup before quiescing Myeonghun Pak
2026-09-10 23:54 ` [PATCH net v3 3/4] net: wan: hdlc: close active devices before protocol detach Myeonghun Pak
2026-09-10 23:54 ` [PATCH net v3 4/4] net: wan: fsl_ucc_hdlc: release HDLC device on remove Myeonghun Pak

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