mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-18 19:12:56 +00:00
xsk: Fix for xp_aligned_validate_desc() when len == chunk_size
[ Upstream commitac31565c21] When desc->len is equal to chunk_size, it is legal. But when the xp_aligned_validate_desc() got chunk_end from desc->addr + desc->len pointing to the next chunk during the check, it caused the check to fail. This problem was first introduced inbbff2f321a("xsk: new descriptor addressing scheme"). Later in2b43470add("xsk: Introduce AF_XDP buffer allocation API") this piece of code was moved into the new function called xp_aligned_validate_desc(). This function was then moved into xsk_queue.h via26062b185e("xsk: Explicitly inline functions and move definitions"). Fixes:bbff2f321a("xsk: new descriptor addressing scheme") Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Magnus Karlsson <magnus.karlsson@intel.com> Link: https://lore.kernel.org/bpf/20210428094424.54435-1-xuanzhuo@linux.alibaba.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
75ea982469
commit
340de910d6
1 changed files with 3 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue