Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9110594pxu; Mon, 28 Dec 2020 06:55:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzE5pBe49qa0VcoKI3iizpcZHrC3eZ+pB2IBe3+egudpGVvIkBoHd/bJpMvO7Wx0T8Jq25 X-Received: by 2002:a17:906:f949:: with SMTP id ld9mr36224024ejb.401.1609167326083; Mon, 28 Dec 2020 06:55:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167326; cv=none; d=google.com; s=arc-20160816; b=RUSYNFyn3RS/N4+3HzEbja1nvmAhJrKgKzRgBch7XLz5En9lMXtq/q+4skOEASj6NY A9kD46IHk9E4GQFJzt3Y1sYsbfbazHlnloVYlC6XjOsi2D27wW1LskIag9WpDuiMYDQH iWSn/4/6LBkzUP6uJS6ZL47syK22BDtgEKu9Dsh2/7hq5N9YJYriahY9gCtruna9bztk XKetkJB4E60L4Bd7bbVWrlpOIT4/njEStbCd6C6Tqasxh4BztvnG2fHPxImtIN5dK1ZH 2K+PoAZid9oRxWAAd1n69DSYLZOGObtx8nR/dMc72CJVSDYvD21Guq13n7LxLFkJ0oiV WDiA== 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=N9Cvn9EGLO/IdFFAXYPvFzFUXewNte5qDrghHstem8s=; b=SA+QQPcrLKfVbta2C8eQ20EgLyY+3WWSKAyadgd5Rd9hSXrHGdoSUUeT+HWoxZpzHQ /wTYT+Y2evkoERdv6utqVElHdYWtF6rkR9sJ4PDQuezb7/t5rW52GwApvKu0vhPvh8jl pubiOPy/nIuBNME46GG5DhoRVcTpFupHng4Wwygh0VG45/m9OnE3FkkS87iYZWnbvEqP Ociitx+QuLzZJhL9AsR9sEHWzB48mwJ0STkg9Y8yQQzxqAQ5Cf0xdWaHkJg9O7dTuq6r FVOZJGP0ikNbFlBr1G1iFNHzUbQygKCxsZZ4FLf2jZy2Me7QniK9pytUAg9pTwT2bAA6 JHbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iL3icmcJ; 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 b8si19869686eds.509.2020.12.28.06.55.01; Mon, 28 Dec 2020 06:55:26 -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=iL3icmcJ; 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 S2392210AbgL1OuG (ORCPT + 99 others); Mon, 28 Dec 2020 09:50:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:56634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437909AbgL1OV1 (ORCPT ); Mon, 28 Dec 2020 09:21:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E977F206E5; Mon, 28 Dec 2020 14:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165272; bh=DIZmWbSHImHgbOwk8uonUwZhsA7leVwUkT4rp6JfqDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iL3icmcJ6AL/rZ20lAlC1pRGU7ECjXUqtuHXliBtNLZq3VFklUbpbRSeFkKlXIZrM IxJOJGP8K1sttHiFjZkjiRit/Fw7wtppeu9NvQUm/WutI3Wlp6NPMveZ3ISKcVn/hJ tm4MfOq6EqheKNCdsRs2jxSiDwe8gHHQ5z1VjsMg= 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 5.10 472/717] net: korina: fix return value Date: Mon, 28 Dec 2020 13:47:50 +0100 Message-Id: <20201228125043.586654044@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 bf48f0ded9c7d..925161959b9ba 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -219,7 +219,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