]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
igb: Always call igb_xdp_ring_update_tail() under Tx lock
authorSriram Yagnaraman <sriram.yagnaraman@est.tech>
Thu, 22 Aug 2024 07:42:07 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:35 +0000 (15:10 +0200)
commit61964f36349d08e351c6eaedba0cf47cf5c343bd
tree774529aa4c7bb2356eac0163905391e42c5f94bd
parent25cf67f8ff2ff04607b556fe4d8d4a402b133d29
igb: Always call igb_xdp_ring_update_tail() under Tx lock

[ Upstream commit 27717f8b17c098c4373ddb8fe89e1a1899c7779d ]

Always call igb_xdp_ring_update_tail() under __netif_tx_lock, add a comment
and lockdep assert to indicate that. This is needed to share the same TX
ring between XDP, XSK and slow paths. Furthermore, the current XDP
implementation is racy on tail updates.

Fixes: 9cbc948b5a20 ("igb: add XDP support")
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
[Kurt: Add lockdep assert and fixes tag]
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igb/igb_main.c