Horia Geantă
f428567e00
crypto: caam - fix endless loop when DECO acquire fails
...
commit 225ece3e7dad4cfc44cca38ce7a3a80f255ea8f1 upstream.
In case DECO0 cannot be acquired - i.e. run_descriptor_deco0() fails
with -ENODEV, caam_probe() enters an endless loop:
run_descriptor_deco0
ret -ENODEV
-> instantiate_rng
-ENODEV, overwritten by -EAGAIN
ret -EAGAIN
-> caam_probe
-EAGAIN results in endless loop
It turns out the error path in instantiate_rng() is incorrect,
the checks are done in the wrong order.
Fixes: 1005bccd7a4a6 ("crypto: caam - enable instantiation of all RNG4 state handles")
Reported-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Suggested-by: Auer Lukas <lukas.auer@aisec.fraunhofer.de>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:23:02 +01:00
..
2017-11-02 11:10:55 +01:00
2018-02-03 17:38:59 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:39:22 +01:00
2018-02-16 20:22:59 +01:00
2017-12-14 09:53:13 +01:00
2018-02-07 11:12:20 -08:00
2018-01-17 09:45:27 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:39:00 +01:00
2017-12-25 14:26:27 +01:00
2018-01-10 09:31:19 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:49 +01:00
2017-12-29 17:53:48 +01:00
2017-12-10 13:40:41 +01:00
2018-02-16 20:22:43 +01:00
2017-12-25 14:26:30 +01:00
2018-02-16 20:23:02 +01:00
2017-12-20 10:10:34 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:22:43 +01:00
2017-12-10 13:40:44 +01:00
2017-12-10 13:40:41 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:22:56 +01:00
2017-11-02 11:10:55 +01:00
2018-02-07 11:12:26 -08:00
2018-02-03 17:38:52 +01:00
2018-02-16 20:22:45 +01:00
2018-02-03 17:38:51 +01:00
2017-11-02 11:10:55 +01:00
2017-12-25 14:26:20 +01:00
2018-02-03 17:39:09 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:39:07 +01:00
2017-12-17 15:08:00 +01:00
2017-11-04 15:01:50 +01:00
2018-02-07 11:12:20 -08:00
2018-01-31 14:03:46 +01:00
2018-02-03 17:39:24 +01:00
2018-01-10 09:31:21 +01:00
2017-12-14 09:53:05 +01:00
2017-11-02 11:10:55 +01:00
2017-12-25 14:26:27 +01:00
2017-12-20 10:10:38 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:53:12 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:39:01 +01:00
2018-02-16 20:23:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:46 +01:00
2018-02-03 17:39:22 +01:00
2018-01-23 19:58:13 +01:00
2018-02-16 20:22:57 +01:00
2018-01-17 09:45:27 +01:00
2018-02-13 10:19:48 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:49 +01:00
2018-02-03 17:39:10 +01:00
2017-11-02 11:10:55 +01:00
2018-02-13 10:19:46 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:47 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:47 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-23 19:58:16 +01:00
2018-02-07 11:12:20 -08:00
2018-01-17 09:45:18 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:38:51 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:53:08 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 10:04:46 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-20 10:10:29 +01:00
2018-01-05 15:48:59 +01:00
2018-02-03 17:38:59 +01:00
2017-11-02 11:10:55 +01:00
2018-02-13 10:19:49 +01:00
2017-11-02 11:10:55 +01:00
2017-12-20 10:10:34 +01:00
2018-02-03 17:39:23 +01:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:23:00 +01:00
2018-01-02 20:31:05 +01:00
2017-12-25 14:26:24 +01:00
2017-12-25 14:26:31 +01:00
2017-12-20 10:10:24 +01:00
2018-02-07 11:12:26 -08:00
2017-11-02 11:10:55 +01:00
2018-02-03 17:39:21 +01:00
2017-11-02 11:10:55 +01:00
2017-12-25 14:26:29 +01:00
2018-02-13 10:19:47 +01:00
2017-12-25 14:26:24 +01:00
2017-12-14 09:52:48 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:22:44 +01:00
2017-11-02 10:04:46 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00