Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp702893pxb; Tue, 5 Apr 2022 19:27:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV8kA3oGxWjFZdUmzu5R3SxsgsVJ6NZS++TsUUIqARcdXYLkQT8ZFCWypWDP9ISfLBtQ5e X-Received: by 2002:aa7:cdd7:0:b0:41c:bede:64b7 with SMTP id h23-20020aa7cdd7000000b0041cbede64b7mr6370345edw.353.1649212063724; Tue, 05 Apr 2022 19:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212063; cv=none; d=google.com; s=arc-20160816; b=h049HsrvQjFPIC7GWuymWAivUgt053oaGGXJxiJp4ZYa6+nINQ8kJDnbXuxgqlW7J5 Gy5VMnPHVX1UDC0BRng4HJS8EY+gsMCRIO++zIZw8nkZCAjFQ7vuTnRNIHRFJdtoe74A dHH04u4gzTbcALurGGNopsiT7Du2MaU65jmCbuNx/bCJ9H4u1L0yZtww+0/PFO73f+dJ dG0iQs4ZTzFgNn0kcS5A8FeMCKjaZA1SFw0CFrA/KClkYyWOFpwqcVBzv/x8CfuXjuxV UUcVQ0uHo5Yov0GUT0GsJv4G0KP0NM2PxHE6Isg62Zw6YVaDW2KwJ5sWLBohnjEk5PIM 9SPA== 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=ZBbCH0L9GMYfeHvEki6hf5NhT/ZMEHsJv1ZALA1Cjr8=; b=RzvumxsY99hDT53052bCs4VFMGy5SijXwCrBMmrUW46ZsrzMwZytO7FluZsajP9Se7 1HggUDUgdsKF4DOBRYDAPJA0KqKCqKO2ReEluIBuAcZAvYQmpgKynzADr+vyVkMSJz2b 3LCc5x1B0yMGHqbtkjKoJVXECN/DOkH/zZO0zqyuZ5iwi7fFSg62sndCpzy/KTb/Z9zl CRpIc7C5uUtXB/nOQ/IjAY4yBZV8BWNes7GUy9bHncCxFMscdaxfQXNVoJaj7Wgphh/v 8E3lFU17d84HBwPUC7s+DFwuPAzK5qyC/4KLt6PtCBWchLrNaZ3FQeM9nqzys3YebeK/ 1cpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lauEI4ZF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a1709061e4400b006dfe7fc57efsi10133824ejj.475.2022.04.05.19.27.17; Tue, 05 Apr 2022 19:27:43 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lauEI4ZF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232120AbiDEHtX (ORCPT + 99 others); Tue, 5 Apr 2022 03:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232215AbiDEHqY (ORCPT ); Tue, 5 Apr 2022 03:46:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 311E998F4D; Tue, 5 Apr 2022 00:41:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5F8B616C8; Tue, 5 Apr 2022 07:41:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1222C340EE; Tue, 5 Apr 2022 07:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649144507; bh=WEe9N+9ZPBN+kqaYXwCV27ckjVn4MxXXv0Z6t5+nE2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lauEI4ZFuYdFBzZK+N95QfVy6SYS7QljOu0RU9vjy2qa2WiIM9Xlb4j+7HD87N2ki 6oIqjO9FIJC2+jUavMo0zMeFvKUQyp2VTmaJOpljahD/o1Bvrz7Jc/DHbdkCTV0I9x kxxmb3/oUw2phIj19XMTXNDfq4UIBPMucLg/h8RQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Haas , Hangyu Hua , Marc Kleine-Budde Subject: [PATCH 5.17 0070/1126] can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path Date: Tue, 5 Apr 2022 09:13:37 +0200 Message-Id: <20220405070409.624648597@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Hangyu Hua commit c70222752228a62135cee3409dccefd494a24646 upstream. There is no need to call dev_kfree_skb() when usb_submit_urb() fails beacause can_put_echo_skb() deletes the original skb and can_free_echo_skb() deletes the cloned skb. Link: https://lore.kernel.org/all/20220228083639.38183-1-hbh25y@gmail.com Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Cc: stable@vger.kernel.org Cc: Sebastian Haas Signed-off-by: Hangyu Hua Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/ems_usb.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -819,7 +819,6 @@ static netdev_tx_t ems_usb_start_xmit(st usb_unanchor_urb(urb); usb_free_coherent(dev->udev, size, buf, urb->transfer_dma); - dev_kfree_skb(skb); atomic_dec(&dev->active_tx_urbs);