linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Petr Mladek <pmladek@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH] random: remove mostly unused async readiness notifier
Date: Wed, 18 May 2022 11:52:24 +0200	[thread overview]
Message-ID: <YoTB2OlwQq4J4/2D@zx2c4.com> (raw)
In-Reply-To: <YoS0Pn9IotUrQh01@alley>

Hi Petr,

On Wed, May 18, 2022 at 10:54:22AM +0200, Petr Mladek wrote:
> > +		spin_lock_irqsave(&filling, flags);
> 
> I thought more about this and there is a small risk of a deadlock
> when get_random_bytes() or queue_work() or NMI calls
> printk()/vsprintf() with %p here.
> 
> A simple solution would be to use trylock():
> 
> 		if (!spin_trylock_irqsave(&filling, flags))
> 			return -EDEADLK;
> 
> Could we do this change, please?
> 
> I do not mind if it will be done by re-spinning the original
> patch or another patch on top of it.

Interesting consideration. Sure, I'll do exactly that and send a v2.

Jason

  reply	other threads:[~2022-05-18  9:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 11:23 [PATCH] random: remove get_random_bytes_arch() and add rng_has_arch_random() Jason A. Donenfeld
2022-05-15 13:18 ` Jason A. Donenfeld
2022-05-15 13:19   ` [PATCH] random: remove mostly unused async readiness notifier Jason A. Donenfeld
2022-05-17  9:04     ` Petr Mladek
2022-05-17  9:48       ` Jason A. Donenfeld
2022-05-17 10:46         ` Petr Mladek
2022-05-18  8:54     ` Petr Mladek
2022-05-18  9:52       ` Jason A. Donenfeld [this message]
2022-05-18  9:56         ` [PATCH v2] " Jason A. Donenfeld
2022-05-19  7:10           ` Petr Mladek
2022-05-17  7:54 ` [PATCH] random: remove get_random_bytes_arch() and add rng_has_arch_random() Petr Mladek

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=YoTB2OlwQq4J4/2D@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).