Message ID | 20210726153830.581847662@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63494C19F3A for <stable@archiver.kernel.org>; Mon, 26 Jul 2021 15:51:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BD5660F5A for <stable@archiver.kernel.org>; Mon, 26 Jul 2021 15:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236381AbhGZPK4 (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 26 Jul 2021 11:10:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:49364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236354AbhGZPIA (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 26 Jul 2021 11:08:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06E9560F9B; Mon, 26 Jul 2021 15:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627314508; bh=auDwRLwTVCHo8yYe7iehfT/XxyLq4c0X3GuENH/smVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1BVJ1RlPw5zim69b/Mdr0pcW4H6I4T50QCSTA+ZMXAPrUp4Rt9fw6hqQF3U7YEulq Wgb873K+BtyctlmqAfIGTJFYL5wCDUYIQdeeXnJuofO4jDtmYGXnrvdekTF+vYfsw/ 83lDitIyNxO/282KkrbXf+ZZKsIvVu7ua9HeVN8Y= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Markus Boehme <markubo@amazon.com>, Tony Brelinski <tonyx.brelinski@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH 4.14 74/82] ixgbe: Fix packet corruption due to missing DMA sync Date: Mon, 26 Jul 2021 17:39:14 +0200 Message-Id: <20210726153830.581847662@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153828.144714469@linuxfoundation.org> References: <20210726153828.144714469@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -1872,7 +1872,8 @@ static void ixgbe_dma_sync_frag(struct i struct sk_buff *skb) { if (ring_uses_build_skb(rx_ring)) { - unsigned long offset = (unsigned long)(skb->data) & ~PAGE_MASK; + unsigned long mask = (unsigned long)ixgbe_rx_pg_size(rx_ring) - 1; + unsigned long offset = (unsigned long)(skb->data) & mask; dma_sync_single_range_for_cpu(rx_ring->dev, IXGBE_CB(skb)->dma,