From patchwork Thu Jan 28 21:25:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8154231 Return-Path: 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 BEA27BEEE5 for ; Thu, 28 Jan 2016 21:42:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E04632020F for ; Thu, 28 Jan 2016 21:42:08 +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 1CEDB201C8 for ; Thu, 28 Jan 2016 21:42:08 +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 1aOuIx-0002oe-O6; Thu, 28 Jan 2016 21:40:39 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOu7r-000612-0W for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2016 21:29:12 +0000 Received: by mail-pa0-x22a.google.com with SMTP id yy13so29102800pab.3 for ; Thu, 28 Jan 2016 13:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VGWsunfVbZPfHenQ/yYyrTT6mBuUuXEkRaljLAydAWU=; b=MfTnhRov96MJa2mojCblwUb+thKQZ9rqooFPUtjWOMmqv8M/VW3eFPo14Svtwg9Cub 74i7tX8Pc5kIltqJYbw9h2DUXy2YYgPpQ4AoNp/j25lI7Iv8uJ7m3SyumAcpzFJzkjkU d4jq87+BiVqlo1SvTBg+VqqA4XgXUYHC836E5s6Vo9B94GmhC/scSDqhCjcAmPV5bZMS yzkLCq5M1EVBPW2oIfcyfhPs7a0kZeQZEG7ixQWM9AqUu0y1dkd1+QTq5HcbouJV8v4U GkSfJwvokZkSkhYYGhi1S9S0VNVNXs3JGI34taV+MJDTxnRhcdb5Ouy0o4KEOoMaj4/r HP9g== 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=VGWsunfVbZPfHenQ/yYyrTT6mBuUuXEkRaljLAydAWU=; b=EEccBOXyc/4d7cj2HTPe+8sga7sYsQYu05oM8yMzpVVSgbGIFHg/l5r1yhUskbnq4/ A6k2TbczKnoYtE5Uv3fQGtcHuXPHKTxHH86RiCVzbKP38syyRZ31EVibJvA3kjmo+a4g MjkHfAZwrorU3sfOWWOPV2unxHYLfn6Ket0lfoFC3jn+dHlB10TcothCDO6AnLyUZYj6 m6eT4xK5dLKNrU6uEj0znp5crm4bOiZxtYh3CjRkY9o1DKf/FKEOfKtvaKuopZhBw4L/ JyVf3Ok3N01AyhWDgWjXCAcEm4o3N8Qx531Btr3zcFJtNRf3u4gc9/J3hTqD97WdVpRD i9QA== X-Gm-Message-State: AG10YOSinc+tGDKpZyG+Dsoy3CRvOn0NUL5MPHFv94plc4ySHVWkUcNiyXVKENlTn5qgDA== X-Received: by 10.66.124.200 with SMTP id mk8mr7934111pab.43.1454016530532; Thu, 28 Jan 2016 13:28:50 -0800 (PST) Received: from localhost.localdomain (wsip-70-184-93-199.ph.ph.cox.net. [70.184.93.199]) by smtp.googlemail.com with ESMTPSA id c90sm18583190pfd.31.2016.01.28.13.28.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 13:28:49 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next 25/40] net: fec: don't free skb until it has been unmapped Date: Thu, 28 Jan 2016 14:25:49 -0700 Message-Id: <1454016364-30985-26-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> References: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_132911_245198_70F0B82E X-CRM114-Status: UNSURE ( 8.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@freescale.com, andrew@lunn.ch, linux@arm.linux.org.uk, Troy Kisky , laci@boundarydevices.com, l.stach@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, tremyfr@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" 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,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Signed-off-by: Troy Kisky --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 98b9be2..380c8e2 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -381,7 +381,6 @@ fec_enet_txq_submit_frag_skb(struct fec_enet_priv_tx_q *txq, addr = dma_map_single(&fep->pdev->dev, bufaddr, frag_len, DMA_TO_DEVICE); if (dma_mapping_error(&fep->pdev->dev, addr)) { - dev_kfree_skb_any(skb); if (net_ratelimit()) netdev_err(ndev, "Tx DMA memory map failed\n"); goto dma_mapping_error; @@ -405,6 +404,7 @@ dma_mapping_error: bdp->cbd_datlen, DMA_TO_DEVICE); bdp->cbd_bufaddr = 0; } + dev_kfree_skb_any(skb); return ERR_PTR(-ENOMEM); }