public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/3] netdevsim: psp: fix init and uninit bugs
@ 2026-05-05 10:42 Daniel Zahka
  2026-05-05 10:42 ` [PATCH net 1/3] netdevsim: psp: only call nsim_psp_uninit() on PFs Daniel Zahka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Zahka @ 2026-05-05 10:42 UTC (permalink / raw)
  To: Jakub Kicinski, Andrew Lunn, David S. Miller, Eric Dumazet,
	Paolo Abeni, Willem de Bruijn, Willem de Bruijn
  Cc: netdev, linux-kernel

This series has three fixes. The first is a straightforward NULL
pointer dereference that is reachable by creating and destroying some
vfs on a kernel with INET_PSP enabled.

The last two patches deal with nsim_psp_rereg_write(), which is a
debugfs handler that reregisters netdevsim's psp_dev without
aquiescing and disabling tx/rx processing. This was added to enable
some tests in psp.py where a psp device is unregistered while it still
referenced by tcp socket state.

There are two issues with this code:
1. Calls to nsim_psp_uninit() are not properly serialized
2. netdevsim's psp_dev refcount can be released while nsim_do_psp() is
   reading from it.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
---
Daniel Zahka (3):
      netdevsim: psp: only call nsim_psp_uninit() on PFs
      netdevsim: psp: serialize calls to nsim_psp_uninit()
      netdevsim: psp: rcu protect psp_dev reference

 drivers/net/netdevsim/netdev.c    |  3 +-
 drivers/net/netdevsim/netdevsim.h |  4 ++-
 drivers/net/netdevsim/psp.c       | 65 +++++++++++++++++++++++++++------------
 3 files changed, 51 insertions(+), 21 deletions(-)
---
base-commit: 07d99587396024932e02474c3a5bede71d108454
change-id: 20260504-psd-rcu-aea28e0e2c14

Best regards,
-- 
Daniel Zahka <daniel.zahka@gmail.com>


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

end of thread, other threads:[~2026-05-05 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 10:42 [PATCH net 0/3] netdevsim: psp: fix init and uninit bugs Daniel Zahka
2026-05-05 10:42 ` [PATCH net 1/3] netdevsim: psp: only call nsim_psp_uninit() on PFs Daniel Zahka
2026-05-05 10:42 ` [PATCH net 2/3] netdevsim: psp: serialize calls to nsim_psp_uninit() Daniel Zahka
2026-05-05 10:42 ` [PATCH net 3/3] netdevsim: psp: rcu protect psp_dev reference Daniel Zahka

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