Thread (4 messages) 4 messages, 2 authors, 2026-03-07
STALE141d

[PATCH net v2 0/2] net: spacemit: A few error handling fixes

From: Vivian Wang <hidden>
Date: 2026-03-05 06:40:06
Also in: linux-riscv, lkml, spacemit

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/ (local)

---
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 (local)

---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help