(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

hwrng: core - reject unknown RNG names

In rng_current_store(), err is 0 after successfully locking rng_mutex, and if the requested RNG name cannot be found, the function reports success even though the current RNG was not changed. Set err = -ENODEV before searching the RNG list to reject unknown names. Fixes: 142a27f0a731 ("hwrng: core - Reset user selected rng by writing "" to rng_current") Cc: stable@vger.kernel.org Signed-off-by: Thorsten Blum <blum@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Author Thorsten Blum Committer Herbert Xu Date Commit Parent 8c515ff8
+1
1 changed file
+1
1 changed file