Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xsk: Fix for xp_aligned_validate_desc() when len == chunk_size
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 in bbff2f3 ("xsk: new descriptor addressing scheme"). Later in 2b43470 ("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 via 26062b1 ("xsk: Explicitly inline functions and move definitions"). Fixes: bbff2f3 ("xsk: new descriptor addressing scheme") Signed-off-by: Xuan Zhuo <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Magnus Karlsson <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
- Loading branch information