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

From: Jakub Kicinski

Date: Tue Jul 21 2026 - 17:36:51 EST


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.