Skip to content

Commit 6044ca2

Browse files
mfijalkoanguy11
authored andcommitted
ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog
It is read by data path and modified from process context on remote cpu so it is needed to use WRITE_ONCE to clear the pointer. Fixes: efc2214 ("ice: Add support for XDP") Reviewed-by: Shannon Nelson <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent ebc33a3 commit 6044ca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ void ice_free_rx_ring(struct ice_rx_ring *rx_ring)
456456
if (rx_ring->vsi->type == ICE_VSI_PF)
457457
if (xdp_rxq_info_is_reg(&rx_ring->xdp_rxq))
458458
xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
459-
rx_ring->xdp_prog = NULL;
459+
WRITE_ONCE(rx_ring->xdp_prog, NULL);
460460
if (rx_ring->xsk_pool) {
461461
kfree(rx_ring->xdp_buf);
462462
rx_ring->xdp_buf = NULL;

0 commit comments

Comments
 (0)