Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1845096rwi; Thu, 20 Oct 2022 18:38:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7noQ0RmMd2qdcteYOUipBXHjYT5Hys/2K6aHKX48iZk8gRu5IyVtSA4SyWtjadjrm9TBIK X-Received: by 2002:aa7:d744:0:b0:45c:e353:e891 with SMTP id a4-20020aa7d744000000b0045ce353e891mr15138786eds.36.1666316331632; Thu, 20 Oct 2022 18:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666316331; cv=none; d=google.com; s=arc-20160816; b=MvSGyHwAvHaw103CJIKolBNROd07hAy1x9Irkjw2P06cKXJaU26XvhsNBnMvZNJSsZ qj+6lPGnf76wRHOIyObAnnZkT9rKlmoUwXRtCrDViuSo72cynVebdyogGnAPOabuXBxf t2OU6r9UrqVwUL3i47O8XmDjs5ku5SU5AJAbmymqd4f4/r4bnuiZcXCZxHvEJN8jaLuA F+DeLlIW9tXPW0SKoJGgVvdJjQcuu93gzJOXB5+PM7fHEmNfSQURW6DwiK1dbiNTrWET ieAF/43kUBCL5CT3c1AQgthj9DrOBEyJ0J4SCtWSymU8OdKiPKbOu9JlbilVEyk0CVff KqiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=x9VVMGW8qoz42sndkXDX13AcOEczJvnXLKCYE5U8zYI=; b=KcIRLc+RExZY+suU5uCR2QtkXR5z1FC909XxZ8By6KiYYvEhkLvoi2O2XkQPJGxAYH Ri3aUAvIX1TtvcwmfIW4ppLn/d7+Qw5ctbcjDLoXLif2JB2CscOrc6AnYMfxEgtA7F0f 3jRqxZjmnP29YCP/e8zrtIGeja1OsKO2DE+DIzsT3uNjDIBYPlNuFOBYD7s7Jq+c5gr2 OITjuK4CdIpFzWlXNsli83zn2dNcZKQFMV9R+UbHvDeQmwpx6cyKyR2cdownw0w6gTKh jsjfDM2Lu2eWOrL8levKsCmdkf6IMk3v2QtGDNrD24ONmq6HsKhhjHh2u7IAfXmT1zu1 3rsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a50c2c9000000b0045cdea002e4si16386829edf.66.2022.10.20.18.38.08; Thu, 20 Oct 2022 18:38:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbiJUBL5 (ORCPT + 99 others); Thu, 20 Oct 2022 21:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJUBLz (ORCPT ); Thu, 20 Oct 2022 21:11:55 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72E8B233995; Thu, 20 Oct 2022 18:11:48 -0700 (PDT) Received: from dggpeml500020.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MtmZS6xMszDsHn; Fri, 21 Oct 2022 09:09:04 +0800 (CST) Received: from dggpeml500006.china.huawei.com (7.185.36.76) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 09:11:45 +0800 Received: from localhost.localdomain (10.175.112.70) by dggpeml500006.china.huawei.com (7.185.36.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 09:11:45 +0800 From: Zhang Changzhong To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Crispin , Ralph Hempel , Ralf Baechle CC: Zhang Changzhong , , Subject: [PATCH net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY Date: Fri, 21 Oct 2022 09:32:24 +0800 Message-ID: <1666315944-30898-1-git-send-email-zhangchangzhong@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.70] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500006.china.huawei.com (7.185.36.76) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ndo_start_xmit() method must not free skb when returning NETDEV_TX_BUSY, since caller is going to requeue freed skb. Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver") Signed-off-by: Zhang Changzhong --- drivers/net/ethernet/lantiq_etop.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 59aab40..f5961bd 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -485,7 +485,6 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev) len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len; if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) { - dev_kfree_skb_any(skb); netdev_err(dev, "tx ring full\n"); netif_tx_stop_queue(txq); return NETDEV_TX_BUSY; -- 2.9.5