]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit699220ce781357190ec644cbf1de4592d9fdae8d
tree7182bdc9c3fcc7659895f3bdc39c6e58e668d166
parente96248a3b348c0184d4315115f62895b9c688398
i40e/i40evf: proper update of the page_offset field

In 4c967040bd3f ("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: 4c967040bd3f ("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