aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2017-12-12 17:36:07 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-12-22 19:52:44 +1100
commit25cf7f06af2264d240c91255bb9c6082d98cc73e (patch)
tree3aaf008542d30ccde544831bb9f2167910d93be1 /crypto
parentcrypto: exynos - Reseed PRNG after generating 2^16 random bytes (diff)
downloadlinux-dev-25cf7f06af2264d240c91255bb9c6082d98cc73e.tar.xz
linux-dev-25cf7f06af2264d240c91255bb9c6082d98cc73e.zip
crypto: exynos - Introduce mutex to prevent concurrent access to hardware
Hardware operations like reading random numbers and setting a seed need to be conducted in a single thread. Therefore a mutex is required to prevent multiple threads (processes) from accessing the hardware at the same time. The sequence of mutex_lock() and mutex_unlock() in the exynos_rng_reseed() function enables switching between different threads waiting for the driver to generate random numbers for them. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions