]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
igc: remove napi_synchronize() in igc_down()
authorDavid Carlier <devnexen@gmail.com>
Sun, 12 Jul 2026 13:22:42 +0000 (14:22 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 28 Jul 2026 18:23:01 +0000 (11:23 -0700)
When an AF_XDP zero-copy application is killed abruptly, the XSK pool is
torn down but NAPI keeps polling. igc_clean_rx_irq_zc() then returns the
full budget on every poll, so napi_complete_done() never clears
NAPI_STATE_SCHED.

igc_down() calls napi_synchronize() before napi_disable(), so it spins
forever waiting for that bit and the interface never goes down. Drop the
napi_synchronize() and let napi_disable() do the job -- it sets
NAPI_STATE_DISABLE, which forces the stuck poll to complete. Reorder it
ahead of igc_set_queue_napi() so the NAPI mapping is cleared only after
polling has stopped, matching the recent igb fix b1e067240379.

Fixes: fc9df2a0b520 ("igc: Enable RX via AF_XDP zero-copy")
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Tested-by: Moriya Kadosh <moriyax.kadosh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c

index 2c9e2dfd84991e9e4f86455d3d18de3a9a786b10..b3883a5a7d7ae195d549c93fbdcdb43c3d149047 100644 (file)
@@ -5352,9 +5352,8 @@ void igc_down(struct igc_adapter *adapter)
 
        for (i = 0; i < adapter->num_q_vectors; i++) {
                if (adapter->q_vector[i]) {
-                       napi_synchronize(&adapter->q_vector[i]->napi);
-                       igc_set_queue_napi(adapter, i, NULL);
                        napi_disable(&adapter->q_vector[i]->napi);
+                       igc_set_queue_napi(adapter, i, NULL);
                }
        }