Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1053177pxp; Thu, 17 Mar 2022 01:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBsCPsoC99i6/5wtQoxSpdNl398cnghRGS4LSw0yDI4PXfwTlDFg+NSI2fr46Z01S1K3/H X-Received: by 2002:aa7:c348:0:b0:418:e515:69e with SMTP id j8-20020aa7c348000000b00418e515069emr3024893edr.393.1647506041755; Thu, 17 Mar 2022 01:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647506041; cv=none; d=google.com; s=arc-20160816; b=oFIEIeTOO1YtpZDlPW6m0Uq3tCK75fdXU3kjJ7RvG82YkX+DbfEUjMwMN+qrycERj0 dPKNZBUOcodUuytY3bfLyAAwcJ9ywTGI7aKfBYH8sGy1ryTWAxq1xg2EkrG9nLiHIfLj fJwxtlWeMpQf7RCulPYbBeYfwdGFffZckyiHrRNQPBJYv6U3lmGz+j6MC+rRy+0Vdjv2 nrKIg4eiObdo3ocv5OV62lzqWPWkzD+KmoOwE47BYVK+jAftkv6O/p9xa23vt9OixUz6 ci9jKyLVPfOHTKaIM6PryPEC7OzwUUJN9VsTAtSWpKettXzR7uy1i8V7SalLuOl7Nrqj 6W7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=h7iCUaSP7caFEMySDsYXpeAyD0/ppCXwYWdAfwv/XyY=; b=mp4KpOIVF1jGTbwowH2u/KIAnMPa6FDDAdzkU1rKzq12FLJOhcXXhqiZV77Rwh9w8U 8TseZ52Y8+aIsc3gbs749G3GMvb4Axztgg0L+jr/ROL53lKd4Vbb2HdoBKOxAHHxLkfl z80VWoicqKpnTBYU0g45SpcmGmN5HGzENODD9a8EyMlDzvIQ3ZUt+4GkpEc6zBZulWv3 h8T0eKQGH93XjvpSyxyqP2lplqdLOKPPXUDUHYxcctna5CF2yWGetXLowq7w7wR88mYX KiKILB3y4AghSJhQQhS3PobyDgqJIFA68FdMNb03ab1dNNw2rKi/azVcnsOkH1WFKCx3 ShKg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a1709063fd000b006d6e4fa55dbsi2414393ejj.18.2022.03.17.01.33.37; Thu, 17 Mar 2022 01:34:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbiCQINQ (ORCPT + 99 others); Thu, 17 Mar 2022 04:13:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbiCQINO (ORCPT ); Thu, 17 Mar 2022 04:13:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F9D1C591B for ; Thu, 17 Mar 2022 01:11:59 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUlEd-00049d-0F; Thu, 17 Mar 2022 09:11:51 +0100 Received: from pengutronix.de (2a03-f580-87bc-d400-5ff9-b2f4-7100-5120.ip6.dokom21.de [IPv6:2a03:f580:87bc:d400:5ff9:b2f4:7100:5120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 30E074CFDE; Thu, 17 Mar 2022 08:11:49 +0000 (UTC) Date: Thu, 17 Mar 2022 09:11:48 +0100 From: Marc Kleine-Budde To: Hangyu Hua Cc: rcsekar@samsung.com, wg@grandegger.com, davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] can: m_can: fix a possible use after free in m_can_tx_handler() Message-ID: <20220317081148.rdnacm4bry76rny4@pengutronix.de> References: <20220317030143.14668-1-hbh25y@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nbv2ga6m4oauj6bi" Content-Disposition: inline In-Reply-To: <20220317030143.14668-1-hbh25y@gmail.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 --nbv2ga6m4oauj6bi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 17.03.2022 11:01:43, Hangyu Hua wrote: > can_put_echo_skb will clone skb then free the skb. It is better to avoid = using > skb after can_put_echo_skb. Why not move the can_put_echo_skb() instead? I'll send a patch. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --nbv2ga6m4oauj6bi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmIy7UIACgkQrX5LkNig 0126egf/eXMrD3xPjDnj4X60OnWYTRdu7/JjPrpV+l7EWntc/GElPXfB2IHoGhNJ yHrEWYruDHUtmYug48mqvaysS+vvCtZ/U1pLyMqueKYEidkgQTmorSudgYUOZny/ y25MOIXTjNgl9p/BBwv5aezPXhUFZufPX/G1D+LB7CJGO9W8K9k/O4AKLtNPAlTf ElnfT7sjXo/Cr+XPiSJXr0h4lAhXglR6+KhsxZwoP+41nzIM6G2z/f0nDQ7ShQGY tGJN+icRxf8izwPanROz+74zIlOKEwn9uHPl5U35CcN8cyzk9A1PMm8DS+tdazh7 Gz5zi+xJChAkYuXXrPTuW3y39SfZGQ== =5dNZ -----END PGP SIGNATURE----- --nbv2ga6m4oauj6bi--