public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: spacemit: A few error handling fixes
@ 2026-03-05  6:39 Vivian Wang
  2026-03-05  6:39 ` [PATCH net v2 1/2] net: spacemit: Fix error handling in emac_alloc_rx_desc_buffers() Vivian Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vivian Wang @ 2026-03-05  6:39 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Yixun Lan, Maxime Chevallier, Vadim Fedorenko,
	Troy Mitchell, Vivian Wang
  Cc: netdev, linux-riscv, spacemit, linux-kernel

Recently a user reported a supposed UAF/double-free in this driver. It
turned out to be a false positive (ugh) from a bug with riscv's
kfence_protect_page() [1], but it did also prompt me to review the
driver code yet again. These are some fixes for error handling problems
that I've found.

[1]: https://lore.kernel.org/r/20260303-handle-kfence-protect-spurious-fault-v2-0-f80d8354d79d@iscas.ac.cn/

---
Changes in v2:
- Retarget to net (Andrew, Jakub)
- Drop what was patch 1 and patch 4 for now, since they are code cleanup
  only and can't affect users (Andrew, Jakub)
- Reworded cover letter
- Link to v1: https://lore.kernel.org/r/20260303-k1-ethernet-more-fixes-v1-0-0ab0122fdd14@iscas.ac.cn

---
Vivian Wang (2):
      net: spacemit: Fix error handling in emac_alloc_rx_desc_buffers()
      net: spacemit: Fix error handling in emac_tx_mem_map()

 drivers/net/ethernet/spacemit/k1_emac.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260303-k1-ethernet-more-fixes-1829c3717cfe

Best regards,
-- 
Vivian "dramforever" Wang


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

end of thread, other threads:[~2026-03-07  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05  6:39 [PATCH net v2 0/2] net: spacemit: A few error handling fixes Vivian Wang
2026-03-05  6:39 ` [PATCH net v2 1/2] net: spacemit: Fix error handling in emac_alloc_rx_desc_buffers() Vivian Wang
2026-03-05  6:39 ` [PATCH net v2 2/2] net: spacemit: Fix error handling in emac_tx_mem_map() Vivian Wang
2026-03-07  3:10 ` [PATCH net v2 0/2] net: spacemit: A few error handling fixes patchwork-bot+netdevbpf

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