Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp438506rwb; Thu, 1 Dec 2022 04:16:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf7zG5RJPIu/g+cjjRCLF8yr8cP9DcSIeSmDhKdqYvchpNuASI/aLs0b1JkZaaeFVyoyzLBe X-Received: by 2002:a17:902:ee55:b0:189:72c2:67f5 with SMTP id 21-20020a170902ee5500b0018972c267f5mr27886612plo.134.1669896995648; Thu, 01 Dec 2022 04:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669896995; cv=none; d=google.com; s=arc-20160816; b=AnW/De0bvZ7b6I+0CSwOUwy0kmJHkSPJo3TBgGejU10pwtkmng6a0WNGBVYmRpMde5 7fM33wuSZfJklionsW49K2JkPQdkNJjfn56XwRv3J7KA4fiiwenu57UgRdhU0DLkqtfL YLNLfA1iIIKmywBb25MmEX8nLOMI4FilNCQJ74UD3UWQCYzGFF9Iyjgh9QhfSf3Y+i/h RaiG7fED0IU2menBdF/ll0KI3bHmrNKK4TDbfSxV3X4fYzLYeZ7PZche8XE7LbbeuWe+ A1qHC6vGQhA1WJEHShYXxcGhyxfjcZgQL64V0XQvg2IGEbGfn/T6oHLB7SJaQbbkIYRb 4E6Q== 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:dkim-signature; bh=b32humZu+PKcy8aKXenWyUF4vn9xYLfzYQwwwXYV6iM=; b=hSzm35vMrWsLQEo/Xpnf9UmtRPHJg/PN0gcR3NihUINIlw9ojLdQjGOtShMavsxsHH tpx5RNKaoPHruVrYayd7RXegq/zGXPVObrPq4bKw2nX+Gsp2oF8qxSpljR+JP9BjzFwT 7qOKvtFWcM5Kc5hptn0pBqKFgRZX5iiIL9ONbwyLQNQ0tahjtx/D2FdiDoLXJhQpRnoe UgnWGY0s70bUCISnVx64yYaWNq1eXsqjRXakGD0hdf8MYKkBFRgK1A4JMpmobr0Gu9eW BwkKfYpoRgBinCUAbgN0rDJGDFwbtXEC2ZIIUOnd2UpRP6iFmSuAAJNDnoU5Y1zrHmI5 or3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNmP9cYw; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik7-20020a170902ab0700b001897bfe1ec1si4238055plb.345.2022.12.01.04.16.23; Thu, 01 Dec 2022 04:16:35 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=ZNmP9cYw; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230439AbiLALne (ORCPT + 82 others); Thu, 1 Dec 2022 06:43:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbiLALn0 (ORCPT ); Thu, 1 Dec 2022 06:43:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8768895804 for ; Thu, 1 Dec 2022 03:43:25 -0800 (PST) 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 CA4B361FAD for ; Thu, 1 Dec 2022 11:43:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 093FDC433D6; Thu, 1 Dec 2022 11:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669895004; bh=b32humZu+PKcy8aKXenWyUF4vn9xYLfzYQwwwXYV6iM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZNmP9cYw7XrR9Fi8RI2ERKG09CjpM13Han0ROS4DngQb9nsxxEjbE2m3By5K6nflD yN52W8Cn8A2smqxX/2MlNHsGPsEBe6F7ZGzwV6Lq9alN+zR2CX84B1mLnWsEk2jCoW QvQI9lE4tlVpwAO6xrmEnqnaqMv2VflFwll5IyFG4lqVhTJlGuGmW5ppnKDzSYuTz7 JZr/JDu9q9IVVmHzdnB3GAHmbwMFYRbM3/4pCX+nRadpcmZMA9qQCkd5dvCbahW7YN CSzOQKTUzQ4EMZspOGw6dz2qrVgVMC+b4KGjCjbZ/E3DKYxuYOGuhDlX1N1yl6Bj7P Cnz1T2Si1AMKg== Date: Thu, 1 Dec 2022 11:43:18 +0000 From: Mark Brown To: cy_huang Cc: lgirdwood@gmail.com, lee@kernel.org, matthias.bgg@gmail.com, yangyingliang@huawei.com, chiaen_wu@richtek.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, ChiYuan Huang Subject: Re: [PATCH 1/2] regulator: mt6370: Fix potential UAF issue Message-ID: References: <1669797463-24887-1-git-send-email-u0084500@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jonyXJ7Ofmg6Ee47" Content-Disposition: inline In-Reply-To: <1669797463-24887-1-git-send-email-u0084500@gmail.com> X-Cookie: Isn't this my STOP?! 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 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 --jonyXJ7Ofmg6Ee47 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 30, 2022 at 04:37:42PM +0800, cy_huang wrote: > The original code uses i2c dev as the parent in order to reuse > the 'regulator_of_get_init_data'. But this will cause regulation > constraint devres attached to i2c dev, not the mfd cell platform > device. This is a general issue which will affect a lot of MFDs, we would be better to fix this by changing the API to provide a device to be used for the devres allocations separately to the one used for looking up the DT. --jonyXJ7Ofmg6Ee47 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOIk1YACgkQJNaLcl1U h9CAEAf+OLCtX/qUZlN1eE3kJF4yWWC2wCV8ARG5w6+YoIv3EjUJGyHkXsdCQ9KP D4nDhttbavKDqseq+3MXE8WpQBqjpH0ib8cjpwrRKgnyREOpkcKRDLGMbZjiN54Y iiCizyQeZc4YKjgO3/If3xwrXhx1pScpT1wm5KJPj/pd7EaZUrReHtf6oZpvRL/4 jiqXoqOwZLVaq4xP1rBY/NAgk6Dxt8RwxfjoiDBXXj8i7lbpAIuEn6ytL2DVPj5Q HDEJ5jB+ezP2OuPEVsc1Y1U0pCdJW6qDHilWbz2iwcwNzp7auHtYY70MhOcRq6x4 haVGL6pyAZeo0va9vqQdvltZB9XTqw== =/yVC -----END PGP SIGNATURE----- --jonyXJ7Ofmg6Ee47--