Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp977579imn; Tue, 26 Jul 2022 14:48:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sbbXjA57jm+k84shQBFqY2amzoSi1biS205PN4jLtrXui3Jkt1M3BZdB7uSqVryDQvK40H X-Received: by 2002:a05:6402:35c:b0:43c:8f51:130 with SMTP id r28-20020a056402035c00b0043c8f510130mr2522037edw.393.1658872113255; Tue, 26 Jul 2022 14:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658872113; cv=none; d=google.com; s=arc-20160816; b=QZvc4UGBeZLILJPKCnznnzkEI0HvlBK7n4B/koE8T/POT3NWpomRtmphjtG5AhD37K PLjZ5f8l+zZJOXeUnNRBkzum9mfFLzyObD0dQyl8OB0fLTLt8lToVxjvyQYdojFeIz1t Xpdd77BToVOO5fUxDflXA4eBomipGDQEEgJ+ku8GWlnVhd+ElJBIq4vJO4LxdeLp8B27 ZLSuES96vQwGQ4aZzUQmZLMLAi0h/jF6fTHh9qL9je5UbRNb7Y4OzaeccvdJMtAsXNF3 N2HW9Ro966zZ3mhsfj/GHwk8hXkXdZN0rUXkszbO7TRDRfvLtKKJVJ3gd6lN4cW5FYYA KeAw== 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:mail-followup-to:message-id:subject:cc:to:from:date; bh=6KjcaaPa4bF8oSFvp3N/ry68tHXkHTl3ckDcPA+6PJM=; b=mpg5rWWjH9MOGOwFBoaIXFQOHEg3naL1n9V4xWbwxnRZYRlR6Lrwmp8345wD75EapR ewIkXWH5BB1/a+kmPcuZ1uDQNuXYo0MO8f/kpmL9SUg0aBcwFkq0WgV4rYnB8d3DjXOC deluxeXzuAYUGspz2PwvJUut7bb59GZiUTUXgOWzV1AaU4L2Febj5R88FJ5T1Lvy3CC3 eV0TeOMb5MBYP6Wi7vP1wTluCBxNzZfIAIDZ0qMDXR8X22O+cR3QZ4X0+GEj1RikYGDo EWdExGvKJv81E6YRvct92n9KIK6w2W1+YJFULJahmWA2mjQWUhoZyAfcRkAjq1OughzH /VLQ== 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 j12-20020a056402238c00b0043bca9c457csi13769829eda.396.2022.07.26.14.48.05; Tue, 26 Jul 2022 14:48:33 -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 S233854AbiGZV3Y (ORCPT + 99 others); Tue, 26 Jul 2022 17:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiGZV3W (ORCPT ); Tue, 26 Jul 2022 17:29:22 -0400 X-Greylist: delayed 600 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 26 Jul 2022 14:29:19 PDT Received: from pokefinder.org (pokefinder.org [135.181.139.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABC4C32BA4; Tue, 26 Jul 2022 14:29:19 -0700 (PDT) Received: from localhost (dynamic-089-204-139-108.89.204.139.pool.telefonica.de [89.204.139.108]) by pokefinder.org (Postfix) with ESMTPSA id C85A9A40D9D; Tue, 26 Jul 2022 23:13:09 +0200 (CEST) Date: Tue, 26 Jul 2022 23:13:08 +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="iiUYzZUHPi8reSBH" Content-Disposition: inline In-Reply-To: <1577439272-10362-1-git-send-email-vulab@iscas.ac.cn> X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_20,RCVD_IN_SORBS_WEB, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 --iiUYzZUHPi8reSBH 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 Applied to for-next, thanks! --iiUYzZUHPi8reSBH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmLgWOQACgkQFA3kzBSg KbZbtg//ePaYx2QwCxG4EjHTERcnAmpuPHra/o50Mww+g5pS52KhFLDTv+VyMAOy Yi+2RA0/mgQ6ZCWtVAOwHdbGJU5JU/fbsPwUfxPl9ZL5gwbWILURRhKFfW6FEWXM MEyICRudH74takwQ8wz9ZUdFQ//7OPe8cVMP0CFXVk8ijmM3VN4TGtv7UrOIF4P4 pDvSIZYR++d66NY9VznFzwnqOrLoQBjbUPc/N85sXhhH53rTuw6fK9Mp0wz/BAX3 3SB4JOtyw+Sdz1GJCyilVNLcMHwGjvAuHovVEyOtCJUSYMOyBVKcgzzigwTQfWZp 6YybbZH3KY2xizu1dutj/0VrojsEtGRvLWU5ppjqLZSiWZG44SvNMLdLya7xoB7i JLMMPTe8EkIwMOcgyJeKSSSFSkevspXImAbF0sRng7syJO8Z4pSIeJs4CrrO+Wd1 ur2dgXnWlqeaQs0f56fKhxWC+x6+Q5fCJOVvoQTfOEKmboFt1L1SJF4K7TK7Z8eK K+B2gr0uRwcDxfjxIe8VtkdMuqsW7irrPEBHHVVIrDNLZMkcEIXLFLRvAb81lvuY qXfoGYrim/QT0tP83iyRqo5+WZPmlVEJ94zWkw8T3TsXabmO0z/5rNEE+Kk/UKwa W0K8/eAq03+h6gN63EuElwXY0xjaP+3StgToBCNQgCQO9UgnWRo= =rsWM -----END PGP SIGNATURE----- --iiUYzZUHPi8reSBH--