All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-pm@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: [BUG] genpd: domains can suspend asynchronously
Date: Tue, 22 Nov 2016 15:07:25 -0800	[thread overview]
Message-ID: <20161122230724.GA86250@google.com> (raw)

Hi,

I reported this previously in the midst of another tangentially-related
thread, so it could easily have gotten lost. I thought I'd repeat it
here.

---

I noticed the genpd code has comments like this scattered all over:

 * This function is only called in "noirq" and "syscore" stages of system power
 * transitions, so it need not acquire locks (all of the "noirq" callbacks are
 * executed sequentially, so it is guaranteed that it will never run twice in
 * parallel).

Isn't that no longer true, now that noirq suspend can be asynchronous?
Maybe we should grep for the phrase "need not acquire locks" throughout
the kernel, in order to find low-hanging fruit for race conditions :)

---

Anyway, I was considering hacking my way through the subsystem here
sometime, but there's no guarantee. And in case someone else wanted to
fix this up, I figured I'd least put the report out there.

NB: I noticed there are more drivers enabling asynchronous suspend these
days. Some USB, SDIO, and MMC host controllers seem ripe for triggering
bugs here.

Brian

             reply	other threads:[~2016-11-22 23:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 23:07 Brian Norris [this message]
2016-11-23 13:08 ` [BUG] genpd: domains can suspend asynchronously Ulf Hansson

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=20161122230724.GA86250@google.com \
    --to=briannorris@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=khilman@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /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.