]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path
authorWang Hai <wanghai38@huawei.com>
Tue, 17 Aug 2021 20:37:36 +0000 (13:37 -0700)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:35:08 +0000 (08:35 -0400)
commitac161cf77818dc0de7cb9c6a9847d33ca28ea34f
treec1d6cfdb443300a1bd7fa290ac10dffe550729d8
parent7af09aeddbaefa61d6d9431b9f0af9c47b4a8da6
ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path

[ Upstream commit 1b80fec7b043552e01609bae7d0aad07aa742adc ]

In ixgbe_xsk_pool_enable(), if ixgbe_xsk_wakeup() fails,
We should restore the previous state and clean up the
resources. Add the missing clear af_xdp_zc_qps and unmap dma
to fix this bug.

Fixes: d49e286d354e ("ixgbe: add tracking of AF_XDP zero-copy state for each queue pair")
Fixes: 4a9b32f30f80 ("ixgbe: fix potential RX buffer starvation for AF_XDP")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20210817203736.3529939-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c