]> git.baikalelectronics.ru Git - kernel.git/commit
hwrng: core - correct error check of kthread_run call
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 24 Jul 2015 11:13:30 +0000 (13:13 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 28 Jul 2015 06:59:54 +0000 (14:59 +0800)
commit8e81b58b4fde6ae43398aa4a9a4eeb99f6b33d46
treef2f58fa3ba55fc20a5b6c786e2d32ad62046ce45
parent84f09d21bf81aa31a07e54a73ec702c3357306e0
hwrng: core - correct error check of kthread_run call

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>
drivers/char/hw_random/core.c