Re: [PATCH net] netpoll: fix a use-after-free on shutdown path

From: Jakub Kicinski

Date: Wed Jun 24 2026 - 22:25:20 EST


On Mon, 22 Jun 2026 08:01:23 -0700 Breno Leitao wrote:
> + * synchronize_net() does not protect the worker
> + * (queue_process() is not an RCU reader). It fences the
> + * senders -- the real RCU readers -- so they cannot re-arm
> + * tx_work after the np->dev->npinfo was set to NULL.
> + */
> + synchronize_net();
> + cancel_delayed_work_sync(&npinfo->tx_work);

Maybe we can avoid the sync_net and the comment by using
disable_delayed_work_sync() ?