]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ixgbe: fix crash in build_skb Rx code path
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 23 Feb 2018 20:39:41 +0000 (12:39 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:27:25 +0000 (08:27 -0500)
commitbe8fc8d79df4d79b51abfdded3c34abedca4d448
tree4c96f037e2bb4fdc7d671db4821487f1b79ea24c
parent6a50b943031108066fc10241f006e29c3bb35147
ixgbe: fix crash in build_skb Rx code path

BugLink: http://bugs.launchpad.net/bugs/1755179
commit 0c5661ecc5dd7ce296870a3eb7b62b1b280a5e89 upstream.

Add check for build_skb enabled ring in ixgbe_dma_sync_frag().
In that case &skb_shinfo(skb)->frags[0] may not always be set which
can lead to a crash. Instead we derive the page offset from skb->data.

Fixes: 42073d91a214 ("ixgbe: Have the CPU take ownership of the buffers sooner")
CC: stable <stable@vger.kernel.org>
Reported-by: Ambarish Soman <asoman@redhat.com>
Suggested-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c