[Intel-wired-lan] [PATCH iwl-net v1] igb/igbvf: disable work items before device removal
Nowlin, Alexander
alexander.nowlin at intel.com
Fri Sep 18 03:04:54 UTC 2026
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of xuanqiang.luo at linux.dev
> Sent: Tuesday, July 21, 2026 3:36 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>; andrew+netdev at lunn.ch; davem at davemloft.net; edumazet at google.com; kuba at kernel.org; pabeni at redhat.com; tj at kernel.org; netdev at vger.kernel.org; Xuanqiang Luo <luoxuanqiang at kylinos.cn>; stable at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH iwl-net v1] igb/igbvf: disable work items before device removal
>
> From: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
>
> A watchdog work item that is already running can queue the reset work after the remove path has canceled it. The netdev Tx timeout handler can also queue the reset work until unregister_netdev() shuts the interface down.
> In igb, device reset interrupts provide another enqueue path. The reset work may then run after free_netdev(), resulting in access to the freed adapter memory.
>
> Although igb_reset_task() checks __IGB_DOWN, checking the bit already dereferences the adapter and therefore cannot protect its lifetime.
>
> Disable the watchdog work first and the reset work second in both drivers.
> Disabling the work items also prevents racing attempts to queue them during device removal.
>
> Fixes: 760141a53e5d ("igb[v],ixgbe: don't use flush_scheduled_work()")
> Cc: stable at vger.kernel.org
> Signed-off-by: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
Tested-by: Alexander Nowlin <alexander.nowlin at intel.com>
More information about the Intel-wired-lan
mailing list