hwrng: core - correct error check of kthread_run call

[ Upstream commit 17fb874dee ]

The kthread_run() function can return two different error values
but the hwrng core only checks for -ENOMEM. If the other error
value -EINTR is returned it is assigned to hwrng_fill and later
used on a kthread_stop() call which naturally crashes.

Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Martin Schwidefsky 2015-07-24 13:13:30 +02:00 • committed by Sasha Levin
commit 25920396cd