[Intel-wired-lan] [PATCH iwl-net v2 3/5] i40e: synchronize reset recovery with device removal

Nowlin, Alexander alexander.nowlin at intel.com
Wed Sep 30 01:16:55 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, August 4, 2026 11:52 PM
> To: intel-wired-lan at lists.osuosl.org; horms at kernel.org
> Cc: vadim.fedorenko at linux.dev; 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; richardcochran at gmail.com; Kwapulinski, Piotr <piotr.kwapulinski at intel.com>; Kubalewski, Arkadiusz <arkadiusz.kubalewski at intel.com>; Loktionov, Aleksandr <aleksandr.loktionov at intel.com>; netdev at vger.kernel.org; Xuanqiang Luo <luoxuanqiang at kylinos.cn>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2 3/5] i40e: synchronize reset recovery with device removal
> 
> From: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
> 
> i40e_remove() currently tears down PTP and device resources before claiming RESET_RECOVERY_PENDING. A service task can pass its initial state check before removal starts and continue into reset recovery after the remove path has begun teardown. This can make i40e_reset_and_rebuild() access or recreate resources that are being released.
> 
> Stop the service timer and disable the service work before claiming reset ownership. disable_work_sync() drains the current service task and rejects later queue_work() attempts, including those from interrupts. Claim the reset bit before starting teardown so an existing reset owner completes first.
> 
> Fixes: 6533e558c650 ("i40e: Fix reset path while removing the driver")
> Signed-off-by: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 28 ++++++++++-----------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin at intel.com>


More information about the Intel-wired-lan mailing list