i40e/i40evf: proper update of the page_offset field
authorBjörn Töpel <bjorn.topel@intel.com>
Mon, 15 May 2017 04:52:00 +0000 (06:52 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 6 Jun 2017 09:49:15 +0000 (02:49 -0700)
commit2aae918c7a21fb8388ab30b8abd4d9240e8ebd7f
tree7182bdc9c3fcc7659895f3bdc39c6e58e668d166
parent9e6c9c0f2ce67534fda1fdd305fb5da3defece3e
i40e/i40evf: proper update of the page_offset field

In f8b45b74cc62 ("i40e/i40evf: Use build_skb to build frames")
i40e_build_skb updates the page_offset field with an incorrect offset,
which can lead to data corruption. This patch updates page_offset
correctly, by properly setting truesize.

Note that the bug only appears on architectures where PAGE_SIZE is
8192 or larger.

Fixes: f8b45b74cc62 ("i40e/i40evf: Use build_skb to build frames")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c