Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3618278pxb; Tue, 19 Apr 2022 06:42:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrNvvKp98V2wrL+4lLgQAZlTydufilwHPSew0M8qa93eTen56nqk/T1kOs3KAs4RS8iAUs X-Received: by 2002:a17:906:4fc8:b0:6d8:5059:f998 with SMTP id i8-20020a1709064fc800b006d85059f998mr14041676ejw.487.1650375767836; Tue, 19 Apr 2022 06:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650375767; cv=none; d=google.com; s=arc-20160816; b=HO++CCsn6+iXT5CHLB2zlz4M/iCJAdzNPjXgBcDCAuYX6Es3elCMFBVgpQ6PfnByRa HkQoe+CEiip2hvawr/w0pa6/siNAJdB+HFpQb3aUoOQyWcJ5t+xA+bsiG3YjBlyIkHtP +WiwlKgkx71RpICgxCDHbAodHi4z++hXAP+Z6uXi818FQGOi9bsDwscA5dZORZ8oGheR 4RbnCrDHhYLHTz/tngWYROnDGxV1J+lgkcEos4WrEE39t60/R7+M8zakVpSshH7BX+Qb uu1ycQeZ3JWEBJgnDw/w8cGFfXCkmzjxozj+iIblzioyUj+wyrmwADmVq+3oE2LGY01z 5EqA== 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=U2COnw6elwX1cOYKK2XQ5qprnC9+tJEsqXtepT8P6fs=; b=KwMw+9zA/X97tLclu7H+ehvB0608LJ0tcDHYAHvSbSTJ7WmCvzB+AmCQ69qf1yCtfl x/y07wg7iBuSa+VtQQUSPGROOyz6DYcc7BWN/ILpPrgPGu5kHjJvTvLvHNZ+ShDbaTln t2Agt8pjfFC/TsFhqYkZaCCdzdDnBTp+q5Gd5y2EQ4LhFLtK0AB/4PbLgp94zQdagJsj VmO+Rhlp0CUrNDDnGiT8BwILwQd7oAPoQZg+pdoD2/cjljNMRBNPslRzzni2MFZ6JqmI uqxRsYGZxmW5EQIM6kOIMHHMDd49fl7XZNIr8e7QeD9wdDck0V50IrjNwvT9vklJfLnM 6cwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vZUiAURX; 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 w5-20020a05640234c500b0041d7b3c5182si9272226edc.419.2022.04.19.06.42.23; Tue, 19 Apr 2022 06:42:47 -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=vZUiAURX; 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 S243876AbiDRNeg (ORCPT + 99 others); Mon, 18 Apr 2022 09:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241937AbiDRNIi (ORCPT ); Mon, 18 Apr 2022 09:08:38 -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 0E910340F6; Mon, 18 Apr 2022 05:48:09 -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 6136961254; Mon, 18 Apr 2022 12:48:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D5CCC385A7; Mon, 18 Apr 2022 12:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286088; bh=A4b2a4onVwfZ3Z/PUXwNCCP2ru+RSO2yvt2SPsiVLO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vZUiAURXMoVqIk2BzNb69/bW+mXjHeNW8hOVboFrSsqIsRyfOjnxRevjUul2xYtmH sTtdacnpJUUVW2ah+lWNd/Dv2kBavLM01L2fNS+4NKd0RO+iBN132dPJwpHCsfQHXI KsSKsVG3jvLnqkUOoZh8gdnrDp8mTXH+2mLsSm1Q= 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 4.14 025/284] can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path Date: Mon, 18 Apr 2022 14:10:06 +0200 Message-Id: <20220418121211.412923013@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 @@ -834,7 +834,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);