Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9171340pxu; Mon, 28 Dec 2020 08:20:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6lTZ7QFwoeotPkWxhJJeq5maIWHfuxusoTp6RiefvO3boVkfLH4G5ij8EDbVBALvk52Jm X-Received: by 2002:a05:6402:1b1e:: with SMTP id by30mr42236336edb.75.1609172435565; Mon, 28 Dec 2020 08:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172435; cv=none; d=google.com; s=arc-20160816; b=A2lAq4jJcGBFnNL1NfQ/GO+X7ZgU0mAldxeaTFk6Ht25aKcLBdQix7In2mUFKgpLa7 eFGopjwVKaF09hHi6gmL/Gahrn79YyjHk17qHepbP2mOjQ+bFEUXoCy6hEiIy5WLyzVr aKEWYzuRQl63Gjti8ZfWkfbziWI/Z9n7qOw1INHsmCFi5fn/dZOi0HrtUnyP+8iFlfBK Ic/baAgqaZ5JoBL3GF7eT2J5/FxqNCivVQ3aAQVUpMFIhtCUTaIDF0BGWff0Pqe9TeMs s4YzJQaTjDrIRlq8jUZX4fjwSfN7s38pm/Qt4qnF9wtgjGsjaeLKq0vNKPUqQLe64Qx0 Rsgg== 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=UKUPm7qKes4utUO0pg+PlLUM80uz7knulWCTlLaXCw8=; b=McuPeSGxcMMFymva6cEwiKRQt86mjC+tfAyKifb7EFtJVyJXUEFNM20f2Cw00TV2ur nxwXDCIYJAuiow8ItXSUzYQ0UUwVwHAhLDBwC9BgkKXdBdadIeFRbgKGuMgZS27jW2jr tLEeI11sO7i5zt3WYtvJDsuSKhBwmczN8KpKi+cb1ZZ7DLJWpKL+YSL2dbm7caBB/duF QgaW1Ajzw0a5pvzwyLHGcqJIEvA6zjQUAL3SPZ4mi7u5uC7ODQqYZ9PwMfN1pAP4/ahI 8Q3kcq/l4epH8szoZfzkbAExon38UgU8RsPPoCP8KLfzuflT0Xs+8c4JO1jHEgZnstYv om3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FZr91lxr; 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 k25si18883905ejz.91.2020.12.28.08.20.09; Mon, 28 Dec 2020 08:20:35 -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=FZr91lxr; 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 S1732742AbgL1NPo (ORCPT + 99 others); Mon, 28 Dec 2020 08:15:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:43926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732723AbgL1NPk (ORCPT ); Mon, 28 Dec 2020 08:15:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86175208BA; Mon, 28 Dec 2020 13:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161299; bh=ztMcmLP2ndXdqPR+hukrhRnfY7xl5Qigjm84IOAIvwk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FZr91lxrALg2jBIflJfUL3/sYTFM/O6V3eVUsuc8mmzmE3kGOtXt0Cit3Jy6fl7pX AjkxzlihabgeoAzMOvB9dON+3+W7pj7lPZi7c0FSFW+nNdMMwt0meMyN0SLRm2h5eO JnfOiKsxgZkEONZQTMxSAUIRXWTel7hLYXECNS08= 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.14 167/242] net: korina: fix return value Date: Mon, 28 Dec 2020 13:49:32 +0100 Message-Id: <20201228124912.916528298@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 1eccdbaa9a515..ec1c14e3eace6 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