mbox series

[0/5] mfd: qcom-spmi-pmic: fix revid implementation

Message ID 20231003152927.15000-1-johan+linaro@kernel.org
Headers show
Series mfd: qcom-spmi-pmic: fix revid implementation | expand

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

Lee Jones Oct. 12, 2023, 10:20 a.m. UTC | #1
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 [李琼斯]
Johan Hovold Oct. 13, 2023, 9:55 a.m. UTC | #2
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
Lee Jones Oct. 13, 2023, 10:15 a.m. UTC | #3
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?
Johan Hovold Oct. 23, 2023, 7:05 a.m. UTC | #4
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
Lee Jones Oct. 25, 2023, 12:17 p.m. UTC | #5
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 [李琼斯]
Lee Jones Oct. 25, 2023, 12:18 p.m. UTC | #6
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.
Johan Hovold Oct. 25, 2023, 12:24 p.m. UTC | #7
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