Skip to content

Commit 28fcb4b

Browse files
minhbq-99Paolo Abeni
authored andcommitted
xsk: add missing virtual address conversion for page
In commit 7ead440 ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()"), when converting from netmem to page, I missed a call to page_address() around skb_frag_page(frag) to get the virtual address of the page. This commit uses skb_frag_address() helper to fix the issue. Fixes: 7ead440 ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()") Reviewed-by: Alexander Lobakin <[email protected]> Signed-off-by: Bui Quang Minh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 35a7a2f commit 28fcb4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/core/xdp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,7 @@ static noinline bool xdp_copy_frags_from_zc(struct sk_buff *skb,
709709
return false;
710710
}
711711

712-
memcpy(page_address(page) + offset,
713-
skb_frag_page(frag) + skb_frag_off(frag),
712+
memcpy(page_address(page) + offset, skb_frag_address(frag),
714713
LARGEST_ALIGN(len));
715714
__skb_fill_page_desc_noacc(sinfo, i, page, offset, len);
716715

0 commit comments

Comments
 (0)