diff options
| author | Tianyu Xu <[email protected]> | 2025-08-12 13:10:56 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-09-09 16:48:30 +0000 |
| commit | 75871a525a596ff4d16c4aebc0018f8d0923c9b1 (patch) | |
| tree | f76963010186bbc7c87ef942a719ccafa218d852 /drivers/net/ethernet/intel/igb/igb_main.c | |
| parent | tunnels: reset the GSO metadata before reusing the skb (diff) | |
| download | kernel-75871a525a596ff4d16c4aebc0018f8d0923c9b1.tar.gz kernel-75871a525a596ff4d16c4aebc0018f8d0923c9b1.zip | |
igb: Fix NULL pointer dereference in ethtool loopback test
The igb driver currently causes a NULL pointer dereference when executing
the ethtool loopback test. This occurs because there is no associated
q_vector for the test ring when it is set up, as interrupts are typically
not added to the test rings.
Since commit 5ef44b3cb43b removed the napi_id assignment in
__xdp_rxq_info_reg(), there is no longer a need to pass a napi_id to it.
Therefore, simply use 0 as the last parameter.
Fixes: 2c6196013f84 ("igb: Add AF_XDP zero-copy Rx support")
Reviewed-by: Aleksandr Loktionov <[email protected]>
Reviewed-by: Joe Damato <[email protected]>
Signed-off-by: Tianyu Xu <[email protected]>
Reviewed-by: Paul Menzel <[email protected]>
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
| -rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index a9a7a94ae61e..453deb6d14b3 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -4453,8 +4453,7 @@ int igb_setup_rx_resources(struct igb_ring *rx_ring) if (xdp_rxq_info_is_reg(&rx_ring->xdp_rxq)) xdp_rxq_info_unreg(&rx_ring->xdp_rxq); res = xdp_rxq_info_reg(&rx_ring->xdp_rxq, rx_ring->netdev, - rx_ring->queue_index, - rx_ring->q_vector->napi.napi_id); + rx_ring->queue_index, 0); if (res < 0) { dev_err(dev, "Failed to register xdp_rxq index %u\n", rx_ring->queue_index); |
