lkml.org 
[lkml]   [2019]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] hwrng: core - move add_early_randomness() out of rng_mutex
From
Date
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

\
 
 \ /
  Last update: 2019-10-14 09:27    [W:0.084 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site