Message ID | 1449152451-2939-2-git-send-email-mw@semihalf.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBF70BEEE1 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 3 Dec 2015 14:23:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07C8D20549 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 3 Dec 2015 14:23:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED1D020513 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 3 Dec 2015 14:23:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a4Uku-0000Zy-AV; Thu, 03 Dec 2015 14:21:08 +0000 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a4Ukb-0000VT-SE for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2015 14:20:50 +0000 Received: by lfs39 with SMTP id 39so87862254lfs.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 03 Dec 2015 06:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CMN1rgh9rJnNfOsQupKUbSHQjt6y8iFHyFwO39FLOuY=; b=e8TBn5oJeU/BZPEmOh9bIGGHOn9/uOaUKEa8xAoGDYhY6shvxmhLD6tYXl7kvWIsMK tK1camYdmVKrhKnVnJ6T6mRlKfVsp7a1ZcwDKKu+8DxPM5SbOlfUG7hT4CDCdM9OsbIx YbEF8JjI3dyotBBr8COJc5v3hQCvFvL9TGKISV3sxOqR9MyJipt1DLL27u4XDmZYRJAH Wd465yJuang/vH41x1w+YnI3gjz6eJ9f8La+ZEGUqTIshsauSIVRBCGhri4WTx0Q4j/i SDAl+/3n/NM/wUu+uab5s1gjHB8IynZQhHSTRifpVCSVVRCjDdWlTVZbchL7IGN02R00 xwYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CMN1rgh9rJnNfOsQupKUbSHQjt6y8iFHyFwO39FLOuY=; b=iSCFjoAxrTPN/bxAhTvdFHTPPv1O4FIF5Vn82bD9x56NMUvNLQDogZFNRNEOfkJKrZ 7JCUH/7O0PbuAptYq7gzhdxcV8yEVtJlPmhXI6Psx351ctOyvSGzZv8daMfJRlephreO 3XCeu5oBSP7Y4/6/ifckC4/rUIOTnpPDUY6Y9QtOnXQMtUtPL1RsT7jCKOqRwQCr8vf1 8Vd96V6q6zrUtVzNC0Ma+hQGQxyQcxi/znzbjh7gFu+ZSIKjw8DSwMgSEXjYHx4QcUcq 2nLaaM4U+YtJhTMNO3/1Mu56i1yLOZPsI0HXORq4PORCKkToDo9W2+9mcYaWUcZ1cBYv X2ew== X-Gm-Message-State: ALoCoQn4cBUf/9srTn2hCdtI/k5gIV8IPz49nfqVzmprPkmqAVdgKO6XzQpdr1qAsbsZVWFWMnfx X-Received: by 10.25.218.9 with SMTP id r9mr5935212lfg.138.1449152427980; Thu, 03 Dec 2015 06:20:27 -0800 (PST) Received: from enkidu.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id a75sm1446399lfe.34.2015.12.03.06.20.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 06:20:27 -0800 (PST) From: Marcin Wojtas <mw@semihalf.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH net 1/3] net: mvpp2: fix missing DMA region unmap in egress processing Date: Thu, 3 Dec 2015 15:20:49 +0100 Message-Id: <1449152451-2939-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1449152451-2939-1-git-send-email-mw@semihalf.com> References: <1449152451-2939-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151203_062050_182133_C0FBA2BC X-CRM114-Status: GOOD ( 11.69 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, linux@arm.linux.org.uk, jason@lakedaemon.net, jaz@semihalf.com, stable@vger.kernel.org, nadavh@marvell.com, alior@marvell.com, ezequiel.garcia@free-electrons.com, tn@semihalf.com, gregory.clement@free-electrons.com, mw@semihalf.com, davem@davemloft.net, sebastian.hesselbarth@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index d9884fd..95db519 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c @@ -4401,11 +4401,10 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port, mvpp2_txq_inc_get(txq_pcpu); - if (!skb) - continue; - dma_unmap_single(port->dev->dev.parent, buf_phys_addr, skb_headlen(skb), DMA_TO_DEVICE); + if (!skb) + continue; dev_kfree_skb_any(skb); } }
The Tx descriptor release code currently calls dma_unmap_single() and dev_kfree_skb_any() if the descriptor is associated with a non-NULL skb. This condition is true only for the last fragment of the packet. Since every descriptor's buffer is DMA-mapped it has to be properly unmapped. Signed-off-by: Marcin Wojtas <mw@semihalf.com> Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Cc: <stable@vger.kernel.org> # v3.18+ --- drivers/net/ethernet/marvell/mvpp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)