]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ixgbe: avoid premature Rx buffer reuse
authorBjörn Töpel <bjorn.topel@intel.com>
Tue, 25 Aug 2020 17:27:35 +0000 (19:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:45 +0000 (11:25 +0100)
commit35d826c94266d842cd4c0a0a60a8805c58397cc2
tree1629d780b4679cf899575f48f8f661c9498b1379
parentde7de695e300900465b4bdd7a796155de20fa00e
ixgbe: avoid premature Rx buffer reuse

[ Upstream commit a06316dc87bdc000f7f39a315476957af2ba0f05 ]

The page recycle code, incorrectly, relied on that a page fragment
could not be freed inside xdp_do_redirect(). This assumption leads to
that page fragments that are used by the stack/XDP redirect can be
reused and overwritten.

To avoid this, store the page count prior invoking xdp_do_redirect().

Fixes: 6453073987ba ("ixgbe: add initial support for xdp redirect")
Reported-and-analyzed-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c