Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2291084pxp; Mon, 21 Mar 2022 16:03:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1g1oTPTPf6w/e5rkIh2iX5tnd8e4gwnebnsIRa4jIil/UzZuIQBMkV4JHuu+1qhlzWzmh X-Received: by 2002:aa7:88c2:0:b0:4fa:ba98:4f6f with SMTP id k2-20020aa788c2000000b004faba984f6fmr237069pff.41.1647903811588; Mon, 21 Mar 2022 16:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647903811; cv=none; d=google.com; s=arc-20160816; b=KELrsPP4uyDykClv7IH1/LPQzwRNAGIF8ZgWPyYIAIcp7Hni5awH3Bu4xSIrW9ROhI pKs0QI+67uRlcZLTEKjdbQ6xpqWlv/l+iKUhVVooha5vH2kfkkZtVCPItbNtaaOh0lRP I9LpNJC3cnxTrR9PZO+rvw+1MKuiMVQcqXnxD4IBXAc6faFjH8D8aiJPGiXgngaN4lY0 NqwcABLB57QUytqB/ZTCUZuuRBV10mf/CS2M4R7wuRtxeEKtmPh7BFFlcuoUtqSf5PNF Rk+4CZak4SwUrLQO/7sD8TG1ReXzwAME77sj5u/XVO/zAVv5e5Ni+jKI/aeaYnSyzqRk mRHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SOfMbm5RJKvVdhj3M5lguM9j4PPbRfpyMx1l0V2G0sM=; b=qUYoU/xqFczSyks5ce1T3RUoxJwGdoFJyLaDaiHSEDc2hQdbndQwouQkjQjAlfBC/x eibXGSUzVBr+XJuZe1PB9VNtBLn47aGJ8qOXs768TXoCzPYBfUkuW8htG160nCnoCPWH pjbfmSe+g0MAkkcntLxVyrtYHplRFarMf+80ZgyJN4IZIU68ou8KKhFGmqnBk5CNRX4X UcDduCRTU13bzr0hYVJQsABisSe0+31nBIMnZ6wRA94sjhVgRGh5mGJLShUgWJE6+n2/ fFlWRL+7axee3wpkDrOHHezongATD0qNRwwZlM36Yi4eVEcyOKHau+zXX6SG9OtPEE5L kJ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="YD/sFWwZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d14-20020a17090a564e00b001bd14e03092si533268pji.106.2022.03.21.16.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="YD/sFWwZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6868A1208A; Mon, 21 Mar 2022 15:02:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344075AbiCUBtE (ORCPT + 99 others); Sun, 20 Mar 2022 21:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343763AbiCUBtB (ORCPT ); Sun, 20 Mar 2022 21:49:01 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D214717E368; Sun, 20 Mar 2022 18:47:37 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id c11so9277578pgu.11; Sun, 20 Mar 2022 18:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=SOfMbm5RJKvVdhj3M5lguM9j4PPbRfpyMx1l0V2G0sM=; b=YD/sFWwZJgwFHupdzTKj19DesWJPVhibD5xUNFAr41Iqcb6q/n0EE5JL2i88wqugvJ 4P7CEEMqcrkZn+e2GwMvW939nl+0L9xEqXL6v66kx4bnHGgsGuxfKBFA6ry8pUpLBjYN 8Q3qT/gTYFKbTpr5ULNEEk6WYj1/ki32mjXXf7zXMQBRjcmGvSES4dXo52rP8lyw0S2h LbPbzP51hsLEGsEuA2T147IXbc7vPpnuZIxEue6vbPa4VYqlapiC02AOyEU12FvZal3U eR5PjYfw7wdGi4rQ/EZrWq0/KkiBeyfYD6tCJ7RC67oPXtLAf60dkH0rFM6UCK71gql1 HDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=SOfMbm5RJKvVdhj3M5lguM9j4PPbRfpyMx1l0V2G0sM=; b=UCqYm7nQXJrUQxWGrkSRZNQovqspnb0KB3N6sA3JRAI/4KRLru9xNKUGTz+pLrjdev JKzLnQCAUNvxhctqGyZeY0Gfk/jABRhmZpdtVp/gvzfnF4ioIx1sE1oLL/i0W/vGtmyT bbRGlQI5Z3rbQHXHdGbHgvy7Sm4Er8dX9eOT0rSRwavSs/3XTLHO35pwhk2sazh52muE WNGKN9RcpeD10k400uLztwdwZy2161XrNREXJrmTfgvcgr5/mbi+IbLTKke5MQcstKx+ z1yO0btSGDrFV9yBTt1y0HRChrEHX4Aij1Ekai/H/kCiW4lEaNK1QtxSIuJS6+kryoBY +AGw== X-Gm-Message-State: AOAM53033oKnmSLw0dC5GslGfI2tCKSxy6UvJoGEwZEmRxrgeXFScLTZ qGKhorkpuUPbRqiTwBxRWSw= X-Received: by 2002:a05:6a00:889:b0:4e0:dcc3:5e06 with SMTP id q9-20020a056a00088900b004e0dcc35e06mr21497904pfj.29.1647827257386; Sun, 20 Mar 2022 18:47:37 -0700 (PDT) Received: from [10.11.37.162] ([103.84.139.53]) by smtp.gmail.com with ESMTPSA id q12-20020a17090a178c00b001bd036e11fdsm18080673pja.42.2022.03.20.18.47.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Mar 2022 18:47:36 -0700 (PDT) Message-ID: <0d2f9980-fb1d-4068-7868-effc77892a97@gmail.com> Date: Mon, 21 Mar 2022 09:47:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] can: mcba_usb: fix possible double dev_kfree_skb in mcba_usb_start_xmit Content-Language: en-US To: yashi@spacecubics.com, wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, kuba@kernel.org, mailhol.vincent@wanadoo.fr, stefan.maetje@esd.eu, paskripkin@gmail.com, remigiusz.kollataj@mobica.com Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220311080208.45047-1-hbh25y@gmail.com> From: Hangyu Hua In-Reply-To: <20220311080208.45047-1-hbh25y@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Gentle ping. On 2022/3/11 16:02, Hangyu Hua wrote: > There is no need to call dev_kfree_skb when usb_submit_urb fails beacause > can_put_echo_skb deletes original skb and can_free_echo_skb deletes the cloned > skb. > > Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") > Signed-off-by: Hangyu Hua > --- > drivers/net/can/usb/mcba_usb.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c > index 77bddff86252..7c198eb5bc9c 100644 > --- a/drivers/net/can/usb/mcba_usb.c > +++ b/drivers/net/can/usb/mcba_usb.c > @@ -364,7 +364,6 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb, > xmit_failed: > can_free_echo_skb(priv->netdev, ctx->ndx, NULL); > mcba_usb_free_ctx(ctx); > - dev_kfree_skb(skb); > stats->tx_dropped++; > > return NETDEV_TX_OK;