Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] pds_core: fix use-after-free on workqueue during remove
@ 2026-06-29 20:03 Nikhil P. Rao
  2026-06-29 20:03 ` [PATCH net v2 1/2] pds_core: fix deadlock between reset thread and remove Nikhil P. Rao
  2026-06-29 20:03 ` [PATCH net v2 2/2] pds_core: fix use-after-free on workqueue during remove Nikhil P. Rao
  0 siblings, 2 replies; 6+ messages in thread
From: Nikhil P. Rao @ 2026-06-29 20:03 UTC (permalink / raw)
  To: netdev
  Cc: kuba, brett.creeley, eric.joyner, andrew+netdev, davem, edumazet,
	pabeni, Nikhil P. Rao

This series fixes a use-after-free on the workqueue during driver remove.

Patch 1 fixes a pre-existing deadlock between the PCI reset worker and
pdsc_remove() that was identified during review of v1.

Patch 2 is the reworked UAF fix that moves destroy_workqueue() after
pdsc_teardown() and adds proper work synchronization.

v2:
- Fix deadlock between pci_reset_thread and remove (new patch 1/2)
  found by sashiko AI review of v1
- Rework UAF fix: move destroy_workqueue() after pdsc_teardown()
  instead of setting wq to NULL (addresses NULL deref found by sashiko)
- Add cancel_work_sync() after free_irq() to drain ISR-queued work
- Reorder adminqcq/notifyqcq freeing to avoid accessing freed notifyqcq

v1: https://lore.kernel.org/netdev/20260610025952.196470-1-nikhil.rao@amd.com/

Nikhil P. Rao (2):
  pds_core: fix deadlock between reset thread and remove
  pds_core: fix use-after-free on workqueue during remove

 drivers/net/ethernet/amd/pds_core/adminq.c | 15 +++++++++++----
 drivers/net/ethernet/amd/pds_core/core.c   | 21 ++++++++++++++-------
 drivers/net/ethernet/amd/pds_core/main.c   |  5 +++--
 3 files changed, 28 insertions(+), 13 deletions(-)

--
2.43.0


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

end of thread, other threads:[~2026-06-29 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 20:03 [PATCH net v2 0/2] pds_core: fix use-after-free on workqueue during remove Nikhil P. Rao
2026-06-29 20:03 ` [PATCH net v2 1/2] pds_core: fix deadlock between reset thread and remove Nikhil P. Rao
2026-06-29 21:30   ` Harshitha Ramamurthy
2026-06-29 20:03 ` [PATCH net v2 2/2] pds_core: fix use-after-free on workqueue during remove Nikhil P. Rao
2026-06-29 21:32   ` Harshitha Ramamurthy
2026-06-29 23:42     ` Rao, Nikhil

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