diff options
| author | Ilya Maximets <i.maximets@samsung.com> | 2019-07-04 17:25:03 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 14:51:01 +0100 |
| commit | fca3e8283f359a8835dd3b981a993f41dad9ed35 (patch) | |
| tree | 62c98c11f98642c85c427680172318d2fa3d12e6 /include | |
| parent | d5fe594a48b7530f79fae9c7e2b2ff4786c2a46c (diff) | |
xdp: fix possible cq entry leak
[ Upstream commit 675716400da6f15b9d3db04ef74ee74ca9a00af3 ]
Completion queue address reservation could not be undone.
In case of bad 'queue_id' or skb allocation failure, reserved entry
will be leaked reducing the total capacity of completion queue.
Fix that by moving reservation to the point where failure is not
possible. Additionally, 'queue_id' checking moved out from the loop
since there is no point to check it there.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: William Tu <u9012063@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
