mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Laurent Vivier <lvivier@redhat.com>
Cc: linux-kernel@vger.kernel.org, Matt Mackall <mpm@selenic.com>,
	linux-crypto@vger.kernel.org,
	'Linux Samsung SOC' <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v2] hwrng: core - move add_early_randomness() out of rng_mutex
Date: Mon, 14 Oct 2019 09:26:46 +0200	[thread overview]
Message-ID: <cf2e09ba-108c-819d-cce1-3ee4818254d2@samsung.com> (raw)
In-Reply-To: <20191012120928.GA24544@gondor.apana.org.au>

Hi

On 12.10.2019 14:09, Herbert Xu wrote:
> On Fri, Oct 11, 2019 at 03:47:24PM +0200, Laurent Vivier wrote:
>> add_early_randomness() is called every time a new rng backend is added
>> and every time it is set as the current rng provider.
>>
>> add_early_randomness() is called from functions locking rng_mutex,
>> and if it hangs all the hw_random framework hangs: we can't read sysfs,
>> add or remove a backend.
>>
>> This patch moves add_early_randomness() out of the rng_mutex zone.
>> It only needs the reading_mutex.
>>
>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>> ---
>>
>> Notes:
>>      v2: in hwrng_register, take rng->ref only if rng is the new current_rng
>>
>>   drivers/char/hw_random/core.c | 61 +++++++++++++++++++++++++----------
>>   1 file changed, 44 insertions(+), 17 deletions(-)
> Please rebase your patch on top of the cryptodev tree, i.e., make
> this an incremental patch with a Fixes header.

This v2 applied on the linux-next with reverted v1 fixes my issue.


When you prepare the incremental patch, feel free to add:

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: daae28debcb0 ("hwrng: core - move add_early_randomness() out of 
rng_mutex")
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


      reply	other threads:[~2019-10-14  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 13:47 Laurent Vivier
2019-10-12 12:09 ` Herbert Xu
2019-10-14  7:26   ` Marek Szyprowski [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=cf2e09ba-108c-819d-cce1-3ee4818254d2@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=mpm@selenic.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

all inboxes | Powered by JetHome®