From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2C58C433EF for ; Thu, 16 Jun 2022 21:00:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378315AbiFPVA3 (ORCPT ); Thu, 16 Jun 2022 17:00:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbiFPVA3 (ORCPT ); Thu, 16 Jun 2022 17:00:29 -0400 Received: from pokefinder.org (sauhun.de [88.99.104.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6ADA960062; Thu, 16 Jun 2022 14:00:26 -0700 (PDT) Received: from localhost (dynamic-089-015-239-099.89.15.239.pool.telefonica.de [89.15.239.99]) by pokefinder.org (Postfix) with ESMTPSA id 4AD7F2C009E; Thu, 16 Jun 2022 23:00:24 +0200 (CEST) Date: Thu, 16 Jun 2022 23:00:22 +0200 From: Wolfram Sang To: Xu Wang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] i2c: Fix a potential use after free Message-ID: Mail-Followup-To: Wolfram Sang , Xu Wang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <1577439272-10362-1-git-send-email-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rYtBd5w2y9ac+Wjk" Content-Disposition: inline In-Reply-To: <1577439272-10362-1-git-send-email-vulab@iscas.ac.cn> Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org --rYtBd5w2y9ac+Wjk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 27, 2019 at 09:34:32AM +0000, Xu Wang wrote: > Free the adap structure only after we are done using it. > This patch just moves the put_device() down a bit to avoid the > use after free. >=20 > Signed-off-by: Xu Wang Added a comment why we reverse the order for putting our stuff and applied to for-next, thanks! This way, we get more testing until it hits upstream. Still, stable tag added because we want it to be backported if all is well. --rYtBd5w2y9ac+Wjk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmKrmeIACgkQFA3kzBSg KbaRUA/8CQ5A2iiywZCEDARYlutF420XPsrdYgQmCh49Gy2UN8PpMOuIDoX10xa6 sf+llbsSQvmPKkeRxnyH51Ctm9gPN8xtVlCFpcZ9+8g6WbhXz0j++i0PUP4YAsW8 0n1MBzxHEuBVRsqJyhZ/JxyR1yjiR6N6RrywsgEty9AYfn9XbXuUz3xlIGd3G5Yj vQQeC+5a8znfHcfr8MOudpMBb3gaAHF/IvqOuiT6y5gSB6d6QqlC8OeQJ/tCkEgk FtdVYRPf43mdZBAH4Kl+uneULnBhIx4YVuUlt1doG+N8szUiSXcCuWfGNwXh9Ta8 s1CaGzG4qXCBjCSl+e2bX1hFr787ZFiyyNRaC8iQ6Eauy6dA7ZWEzz9I2wQgHkhg ALqADG+YENA90QKsGLdDMzkZH3c6udQXt3qnn+TEuN89x8KTIJFuExZGM97EsHNW 1SgFuV56iCYdgWocuD2cdD6Om6bR0q75LlcuWM76w5JBZ6JenPutQbCc6uJ9PZoN CvDfm043rzsbtCbX1E8OMFPeXmnrF7OSDYrJXWXHflBP34wTcz8dqdJY2gOp31mv WvPGa36x4swQdKJg2qdenJG5HljDQISVbI1K/OESYMQoOWOVTf8F4T58HsQGjQ/r 1ssEIHcr/sGaiqL/v4nsatV4EQNwnJuIWDwXBXG+AX/3Yor60Rw= =t3S7 -----END PGP SIGNATURE----- --rYtBd5w2y9ac+Wjk--