All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Johan Hovold <johan+linaro@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Liu Ying <victor.liu@nxp.com>
Subject: Re: [PATCH] bus: simple-pm-bus: fix forced runtime PM use
Date: Fri, 14 Feb 2025 13:53:12 +0100	[thread overview]
Message-ID: <Z688uKdqVDaQhm5V@hovoldconsulting.com> (raw)
In-Reply-To: <CAPDyKFr98DraLvOC83rRFa=uKj_hmwS7Lj0L3JqrbqcFuhdWGA@mail.gmail.com>

On Fri, Feb 14, 2025 at 01:36:48PM +0100, Ulf Hansson wrote:
> On Fri, 14 Feb 2025 at 11:21, Johan Hovold <johan+linaro@kernel.org> wrote:
> >
> > The simple-pm-bus driver only enables runtime PM for some buses
> > ('simple-pm-bus') yet has started calling pm_runtime_force_suspend() and
> > pm_runtime_force_resume() during system suspend unconditionally.
> >
> > This currently works, but that is not obvious and depends on
> > implementation details which may change at some point.
> >
> > Add dedicated system sleep ops and only call pm_runtime_force_suspend()
> > and pm_runtime_force_resume() for buses that use runtime PM to avoid any
> > future surprises.
> >
> > Fixes: c45839309c3d ("drivers: bus: simple-pm-bus: Use clocks")
> 
> This doesn't look like it is needed to me. It isn't broken, right?

I didn't add a CC stable tag since this currently works, but I still
consider it a bug to call these helpers unconditionally when not using
runtime PM.

[ And during rc1 these callbacks were suddenly called and triggered a
NULL-pointer dereference as you know. [1] ]

Johan

[1] https://lore.kernel.org/lkml/Z6YcjFBWAVVVANf2@hovoldconsulting.com/

  reply	other threads:[~2025-02-14 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 10:21 [PATCH] bus: simple-pm-bus: fix forced runtime PM use Johan Hovold
2025-02-14 12:36 ` Ulf Hansson
2025-02-14 12:53   ` Johan Hovold [this message]
2025-02-14 13:16     ` Geert Uytterhoeven
2025-02-14 13:27       ` Johan Hovold
2025-02-14 13:31         ` Geert Uytterhoeven
2025-02-14 21:24 ` Rafael J. Wysocki
2025-02-17  3:15 ` Liu Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z688uKdqVDaQhm5V@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan+linaro@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.liu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.