Re: [PATCH v2] mac802154: hold an interface reference across the scan worker

Jakub Kicinski <[email protected]> Tue, 21 Jul 2026 14:00:37 -0700
Newsgroups org.kernel.vger.linux-wpan,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.stable
Message-ID <[email protected]>
On Fri, 17 Jul 2026 12:58:09 +0200 Ibrahim Hashimov wrote:
> +	/*
> +	 * sdata->dev is dereferenced below after rcu_read_unlock() and outside
> +	 * the rtnl, and a concurrent DEL_INTERFACE / PHY teardown can free it
> +	 * asynchronously from netdev_run_todo(). Pin it with a reference taken
> +	 * while the RCU read lock is still held, and drop it at every exit.
> +	 */
> +	dev_hold(sdata->dev);

Please use netdev_hold() with a tracker on the stack.
Please don't post new versions in reply to old ones.