Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Thomas Richard <thomas.richard@bootlin.com>
Cc: Olivia Mackall <olivia@selenic.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregory.clement@bootlin.com, richard.genoud@bootlin.com,
	u-kumar1@ti.com, a-kumar2@ti.com
Subject: Re: [PATCH v4] hwrng: core - Stop/start hwrng_fillfn() kthread before/after suspend-resume
Date: Tue, 28 Jul 2026 17:35:19 +1000	[thread overview]
Message-ID: <amhbtwboWHXKaBZU@gondor.apana.org.au> (raw)
In-Reply-To: <d0d77fe9-d806-4ecf-9e40-7ddab8dcac45@bootlin.com>

On Mon, Jul 27, 2026 at 11:30:41AM +0200, Thomas Richard wrote:
>
> Oh yes, indeed Sashiko is right. PM notifiers are run before user space
> processes freezing.
> 
> What do you think if I lock the rng_mutex at the very beginning of
> suspend and release it at the end of resume?

Wouldn't this just cause a hang if said race occurred during
suspension?

Ideally, we want the sysfs store to either result in an error
due to the ongoing suspension, or at least fail silently without
affecting the suspension.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2026-07-28  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 11:25 [PATCH v4] hwrng: core - Stop/start hwrng_fillfn() kthread before/after suspend-resume Thomas Richard (TI)
2026-07-26 23:55 ` Herbert Xu
2026-07-27  9:30   ` Thomas Richard
2026-07-28  7:35     ` Herbert Xu [this message]

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=amhbtwboWHXKaBZU@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=a-kumar2@ti.com \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivia@selenic.com \
    --cc=richard.genoud@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas.richard@bootlin.com \
    --cc=u-kumar1@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox