Message ID | 20231003152927.15000-1-johan+linaro@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2165031vqb; Tue, 3 Oct 2023 08:29:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdSqpPBRzvthYy69RAawgZm88BHVWP2f6zfQazMyK0tK4iWkbccE5pI3TGkYau6p+wZuUl X-Received: by 2002:a17:903:120e:b0:1bc:7001:6e5e with SMTP id l14-20020a170903120e00b001bc70016e5emr16955512plh.32.1696346980061; Tue, 03 Oct 2023 08:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696346980; cv=none; d=google.com; s=arc-20160816; b=ETf5p1ShyVmTNrFvalS/DRBzM5/UkUjrSA9n0LkqYXDNbttUZ9bElG3J8MXLMJYDFe 6ic5oYjg906WKBrauq69uqIjEDqRmb8K5C4cjWCERspWPNgjpWZlO6j8ODXbvR36fGU5 KMsQOKBrqGwAuNPJ54zDLcLVbjuL4UNiPrEf5HOXPRKKV2BnQ2YZ/3ogsj0wginguyhu WoWETmXHaRTyfq3olDwYqk8JKYfy4J36JDTldnsN6hFCSqDVBeYaasGA77LZ7xi2zcmF CPN+fYfA1M90MdOMXu4a+g45+tYNtTNSjMJBsEcFzjtBwXxJaa2E8OXzMCQbv0zQBGDo Wlgg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hrohVkKCKeEq/BZ//Osol68d+MI+ifmPioASQXrTKh4=; fh=AI8r/JvGuyuehyNrjB6kC4VCCb7N9TwD6vcK6cIxpvM=; b=g9a2J+uEupAnG6iRtEMnj5wwOoqQRcjEQpUqIhS+K35DBunzth4lLrtEy6+et919I+ 3kqBiL9nfkhVBpUnovSBNsv5QbQz5eHPJEpxGL1ty+839U/EjpSiLzmaHaPFh8kKer2+ LLnM/ojfhoCp8AU/tnaPkPcuIikfvhtgHtPj8B8QFk6AD1/Vm8d5O8rWcwC+pDl8Ue76 hilw13bhfTXv6jkzGP7ElPzr/Wdh4CgBx7kS8g585YAGSbzttFpd4kualRSKmH1qtQNs JsBancgEnwO+shZ4emFXOka7s1MwVuOw8jeS+iUbg5Ti5evDOF27f9Yd/CoVp8KsP8JJ JMhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nScQhqAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b3-20020a170902650300b001c618473ac1si1488772plk.627.2023.10.03.08.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:29:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nScQhqAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 54EEA80934A2; Tue, 3 Oct 2023 08:29:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232611AbjJCP3j (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 11:29:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231394AbjJCP3i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 11:29:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52CC6A6; Tue, 3 Oct 2023 08:29:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E65F8C433C9; Tue, 3 Oct 2023 15:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696346975; bh=jdmFvf1XK1R60wkH3BVlLhkwT3ffaOVJ5+VG7EPRU/Q=; h=From:To:Cc:Subject:Date:From; b=nScQhqAfb8exmyHDZCRDCAh4Kc/h1bJD52yBDwzQXgJWiB8YlfAdFUItN66FcVrPM oQmJKlGXZv+qvaR4wNyN7MVhT9NfMM4UIGJJKGFwLlNRUo0tIR7XliTkGibNdFmfA6 PbvQ6o/EXt3jOvAc8KzhSK3lcm9FKWa/QVLrgihJxXIOCCM4UFEE0BmzoGEhwODbRF yuWLivvlVdcEVUocYA3/ZtrcjMVDRmfQ1qjM/9bb/g/GzgIPGbLpuD8RMGAuyzzlzE f++Ao8rzPBns1iRvalw1O57dpwegOvy7HuZ6svo3HDB5fxPoDkir82nqm49bxiQwGg ApDflH2yoEQ9A== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from <johan+linaro@kernel.org>) id 1qnhLF-0003uJ-1z; Tue, 03 Oct 2023 17:29:45 +0200 From: Johan Hovold <johan+linaro@kernel.org> To: Lee Jones <lee@kernel.org> Cc: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Stephen Boyd <sboyd@kernel.org>, Caleb Connolly <caleb.connolly@linaro.org>, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH 0/5] mfd: qcom-spmi-pmic: fix revid implementation Date: Tue, 3 Oct 2023 17:29:22 +0200 Message-ID: <20231003152927.15000-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:29:39 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778748731198357509 X-GMAIL-MSGID: 1778748731198357509 |
Series |
mfd: qcom-spmi-pmic: fix revid implementation
|
|
Message
Johan Hovold
Oct. 3, 2023, 3:29 p.m. UTC
The Qualcomm SPMI PMIC revid implementation is broken in multiple ways that can lead to resource leaks and crashes. This series reworks the implementation so that can be used safely. Included is also a rename of the SPMI device lookup helper which can hopefully help prevent similar leaks from being reintroduced. Johan Johan Hovold (5): mfd: qcom-spmi-pmic: fix reference leaks in revid helper mfd: qcom-spmi-pmic: fix revid implementation mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() spmi: document spmi_device_from_of() refcounting spmi: rename spmi device lookup helper drivers/mfd/qcom-spmi-pmic.c | 103 +++++++++++++++++++++++++---------- drivers/spmi/spmi.c | 9 ++- include/linux/spmi.h | 2 +- 3 files changed, 80 insertions(+), 34 deletions(-)
Comments
On 03/10/2023 16:29, Johan Hovold wrote: > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > that can lead to resource leaks and crashes. This series reworks the > implementation so that can be used safely. > > Included is also a rename of the SPMI device lookup helper which can > hopefully help prevent similar leaks from being reintroduced. > > Johan This is.. definitely a major improvement. Thanks for cleaning up my mess fwiw Acked-by: Caleb Connolly <caleb.connolly@linaro.org> > > > Johan Hovold (5): > mfd: qcom-spmi-pmic: fix reference leaks in revid helper > mfd: qcom-spmi-pmic: fix revid implementation > mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() > spmi: document spmi_device_from_of() refcounting > spmi: rename spmi device lookup helper > > drivers/mfd/qcom-spmi-pmic.c | 103 +++++++++++++++++++++++++---------- > drivers/spmi/spmi.c | 9 ++- > include/linux/spmi.h | 2 +- > 3 files changed, 80 insertions(+), 34 deletions(-) >
On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > that can lead to resource leaks and crashes. This series reworks the > implementation so that can be used safely. > > Included is also a rename of the SPMI device lookup helper which can > hopefully help prevent similar leaks from being reintroduced. > > [...] Applied, thanks! [1/5] mfd: qcom-spmi-pmic: fix reference leaks in revid helper commit: 365cf70ff33fe20e749227346d7245f7f0dccb58 [2/5] mfd: qcom-spmi-pmic: fix revid implementation commit: 7370f9de463b1d21dcdf9480a0a15babecd14ac7 [3/5] mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() commit: b5cd5e72a71e9d368e20271d3a772dd045ae220e -- Lee Jones [李琼斯]
On Thu, Oct 12, 2023 at 11:20:57AM +0100, Lee Jones wrote: > On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > > that can lead to resource leaks and crashes. This series reworks the > > implementation so that can be used safely. > > > > Included is also a rename of the SPMI device lookup helper which can > > hopefully help prevent similar leaks from being reintroduced. > > > > [...] > > Applied, thanks! > > [1/5] mfd: qcom-spmi-pmic: fix reference leaks in revid helper > commit: 365cf70ff33fe20e749227346d7245f7f0dccb58 > [2/5] mfd: qcom-spmi-pmic: fix revid implementation > commit: 7370f9de463b1d21dcdf9480a0a15babecd14ac7 > [3/5] mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() > commit: b5cd5e72a71e9d368e20271d3a772dd045ae220e Thanks for picking these up, Lee. You don't seem to have pushed these out yet so I'm not sure if you intend to send them on for 6.6-rc or 6.7-rc1 yet. Either way, would it be possible to include also the related and dependant spmi cleanups? Stephen, could you ack those changes so Lee can take them as well? Johan
On Fri, 13 Oct 2023, Johan Hovold wrote: > On Thu, Oct 12, 2023 at 11:20:57AM +0100, Lee Jones wrote: > > On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > > > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > > > that can lead to resource leaks and crashes. This series reworks the > > > implementation so that can be used safely. > > > > > > Included is also a rename of the SPMI device lookup helper which can > > > hopefully help prevent similar leaks from being reintroduced. > > > > > > [...] > > > > Applied, thanks! > > > > [1/5] mfd: qcom-spmi-pmic: fix reference leaks in revid helper > > commit: 365cf70ff33fe20e749227346d7245f7f0dccb58 > > [2/5] mfd: qcom-spmi-pmic: fix revid implementation > > commit: 7370f9de463b1d21dcdf9480a0a15babecd14ac7 > > [3/5] mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() > > commit: b5cd5e72a71e9d368e20271d3a772dd045ae220e > > Thanks for picking these up, Lee. You don't seem to have pushed these > out yet so I'm not sure if you intend to send them on for 6.6-rc or > 6.7-rc1 yet. Just pushed. Should be in -next tomorrow. These do not fix commits from this release and I'm not planning on sending another PR for the current rcs, so these are due for v6.7-rc1. > Either way, would it be possible to include also the related and > dependant spmi cleanups? With Acks, sure. > Stephen, could you ack those changes so Lee can take them as well?
Hi Stephen, On Fri, Oct 13, 2023 at 11:55:27AM +0200, Johan Hovold wrote: > On Thu, Oct 12, 2023 at 11:20:57AM +0100, Lee Jones wrote: > > On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > > > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > > > that can lead to resource leaks and crashes. This series reworks the > > > implementation so that can be used safely. > > > > > > Included is also a rename of the SPMI device lookup helper which can > > > hopefully help prevent similar leaks from being reintroduced. > > > > > > [...] > > > > Applied, thanks! > > > > [1/5] mfd: qcom-spmi-pmic: fix reference leaks in revid helper > > commit: 365cf70ff33fe20e749227346d7245f7f0dccb58 > > [2/5] mfd: qcom-spmi-pmic: fix revid implementation > > commit: 7370f9de463b1d21dcdf9480a0a15babecd14ac7 > > [3/5] mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() > > commit: b5cd5e72a71e9d368e20271d3a772dd045ae220e > > Thanks for picking these up, Lee. You don't seem to have pushed these > out yet so I'm not sure if you intend to send them on for 6.6-rc or > 6.7-rc1 yet. > > Either way, would it be possible to include also the related and > dependant spmi cleanups? > > Stephen, could you ack those changes so Lee can take them as well? Could you please consider acking the two SPMI patches so that they can go in through Lee's tree along with the rest of the series for 6.7-rc1 (e.g. to avoid dealing with inter-tree dependencies)? Johan
On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > that can lead to resource leaks and crashes. This series reworks the > implementation so that can be used safely. > > Included is also a rename of the SPMI device lookup helper which can > hopefully help prevent similar leaks from being reintroduced. > > [...] Applied, thanks! [4/5] spmi: document spmi_device_from_of() refcounting commit: 7db72c01ae2359dbab29f4a60cda49757cf84516 [5/5] spmi: rename spmi device lookup helper (no commit info) -- Lee Jones [李琼斯]
On Wed, 25 Oct 2023, Lee Jones wrote: > On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > > The Qualcomm SPMI PMIC revid implementation is broken in multiple ways > > that can lead to resource leaks and crashes. This series reworks the > > implementation so that can be used safely. > > > > Included is also a rename of the SPMI device lookup helper which can > > hopefully help prevent similar leaks from being reintroduced. > > > > [...] > > Applied, thanks! > > [4/5] spmi: document spmi_device_from_of() refcounting > commit: 7db72c01ae2359dbab29f4a60cda49757cf84516 > [5/5] spmi: rename spmi device lookup helper > (no commit info) Not entirely sure why B4 is sending out these separately! Still, both applied, thanks.
On Wed, Oct 25, 2023 at 01:18:27PM +0100, Lee Jones wrote: > On Wed, 25 Oct 2023, Lee Jones wrote: > > On Tue, 03 Oct 2023 17:29:22 +0200, Johan Hovold wrote: > > > Included is also a rename of the SPMI device lookup helper which can > > > hopefully help prevent similar leaks from being reintroduced. > > Applied, thanks! > > > > [4/5] spmi: document spmi_device_from_of() refcounting > > commit: 7db72c01ae2359dbab29f4a60cda49757cf84516 > > [5/5] spmi: rename spmi device lookup helper > > (no commit info) > > Not entirely sure why B4 is sending out these separately! > > Still, both applied, thanks. Thanks for taking these, and thanks for the acks Stephen! Johan