Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9178576pxu; Mon, 28 Dec 2020 08:31:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaTltmeCneU/KPPzySS62ncP0BxAvJy5SZ462bSkGVRiQpGbT32pOb1z3bEn2zL/IT8kst X-Received: by 2002:a17:906:1f07:: with SMTP id w7mr19974009ejj.519.1609173116433; Mon, 28 Dec 2020 08:31:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173116; cv=none; d=google.com; s=arc-20160816; b=nKJfSWy3fEI7oeexPboSgsZNxWCfD8dBkfmL+IQfw5IsUYJnvFsDHTffHg2sd08CRJ /14cFLeyKX7HWZLctOte4Bt42eZg2FHFloTEge2x7MPkfmeULEgDIGzk0HcehsPtSWDo Pl1X1/YFokCs9Uo0oEuikRe2oNt2S5eBn84cekhaUePGl6H+Q3/GAzM1cqzhmcc2bCbT z487n9ZwqlskYIXfYK5+AXQyFEm0/LrD0IXRScs8Nqkg47pABHbIC7WkBuh9qWBl8CsO NyTrKZ3n1Kr2dO6B6h5m2NZChUFUZOzqcRJWhKNC2wiw1XDUAL5TY/JMg4A3pzSMLTpn lzVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hrx5AH9MKXxRJfpf/dr02oCfXgHg5BoJAe//Eo0GqMI=; b=Wld6++xWgJ5klm6cS4rYs2+XgR21ZXqc7P/4rtrDDNIf0vN9yTtAZX78tJWgKcOMoU z8k12+7qqpRuUyjn0g5Z9Jd0L1at4utyx7hOulsa09qumhE5yFNWwMAXEIE+MaGP4Emy brhR54z4F2HMFXntQW7QTKBbVazHuTu2D5mSuJEIzwbYHLHhNyaZwri+i5qt25oBaRun MoMCU7IbL+FoG5rwGI8I5E6OdfbGXt5ecWmxslYwfWqOW8eRw2iT9cC4ANXkmd3Nb6r2 mpkZrbCnitUc9FvudXDWKxuHsDpWvgsrQ7l1lVWYRwcrcxRPTwDFcWUgmhGJXpwKrmSk DeVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/uYxL2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e28si17715401edj.216.2020.12.28.08.31.34; Mon, 28 Dec 2020 08:31:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/uYxL2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730717AbgL1NHO (ORCPT + 99 others); Mon, 28 Dec 2020 08:07:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:34016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730841AbgL1NGO (ORCPT ); Mon, 28 Dec 2020 08:06:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F7FB208BA; Mon, 28 Dec 2020 13:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160734; bh=eptr1VOMUZ/Sxd/aF0suxtNHdsUVfmGFUTJTc3GzE6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M/uYxL2/1UHVwn+Gj9Eo+spsZwzSQKAmh1JLxLngkQSH0fxrTXTmD/yPu/16mdap3 +yPjdlGufpsJVF6/B8I7VTWYYGMWYn+Xx2qGupjUXNpexNoVXxFDD0c/izu79kCfoq +UyqrM1XlvqT9HsyGx7mTdSRAL5tes5Uy1v88DBM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , =?UTF-8?q?Vincent=20Stehl=C3=A9?= , Florian Fainelli , Sasha Levin Subject: [PATCH 4.9 122/175] net: korina: fix return value Date: Mon, 28 Dec 2020 13:49:35 +0100 Message-Id: <20201228124859.170110953@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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: X-Mailing-List: linux-kernel@vger.kernel.org From: Vincent Stehlé [ Upstream commit 7eb000bdbe7c7da811ef51942b356f6e819b13ba ] The ndo_start_xmit() method must not attempt to free the skb to transmit when returning NETDEV_TX_BUSY. Therefore, make sure the korina_send_packet() function returns NETDEV_TX_OK when it frees a packet. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Suggested-by: Jakub Kicinski Signed-off-by: Vincent Stehlé Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201214220952.19935-1-vincent.stehle@laposte.net Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/korina.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index cd8895838a04c..4cf1fc89df3c6 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -216,7 +216,7 @@ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev) dev_kfree_skb_any(skb); spin_unlock_irqrestore(&lp->lock, flags); - return NETDEV_TX_BUSY; + return NETDEV_TX_OK; } } -- 2.27.0