Eric Biggers
5f2d256875
crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS
...
commit 30d0f6a956fc74bb2e948398daf3278c6b08c7e9 upstream.
crypto_stats_get() is a no-op when the kernel is compiled without
CONFIG_CRYPTO_STATS, so pairing it with crypto_alg_put() unconditionally
(as crypto_rng_reset() does) is wrong.
Fix this by moving the call to crypto_stats_get() to just before the
actual algorithm operation which might need it. This makes it always
paired with crypto_stats_rng_seed().
Fixes: eed74b3eba9e ("crypto: rng - Fix a refcounting bug in crypto_rng_reset()")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-11 14:04:15 +02:00
..
2021-01-12 20:16:17 +01:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-04-25 15:38:12 +08:00
2019-08-15 21:52:14 +10:00
2019-08-30 18:05:30 +10:00
2019-08-30 18:05:27 +10:00
2019-08-15 21:52:15 +10:00
2019-08-30 18:05:30 +10:00
2019-08-15 21:52:14 +10:00
2019-07-26 14:55:33 +10:00
2020-12-30 11:51:00 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-06-17 16:40:30 +02:00
2020-06-24 17:50:51 +02:00
2020-10-29 09:57:29 +01:00
2020-07-09 09:37:52 +02:00
2018-05-26 09:16:44 +02:00
2020-10-29 09:57:30 +01:00
2019-05-24 17:27:12 +02:00
2019-06-13 14:31:39 +08:00
2021-05-11 14:04:05 +02:00
2019-07-08 20:57:08 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:45 +02:00
2019-05-30 11:25:16 -07:00
2021-03-20 10:39:47 +01:00
2019-05-24 17:27:12 +02:00
2019-05-30 11:26:32 -07:00
2019-06-18 08:52:34 +02:00
2019-04-18 22:15:03 +08:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-04-18 22:15:03 +08:00
2019-05-30 11:26:32 -07:00
2013-09-12 15:31:34 +10:00
2019-04-18 22:15:03 +08:00
2019-08-15 21:52:13 +10:00
2019-08-09 15:11:52 +10:00
2019-07-08 20:57:08 -07:00
2019-12-13 08:43:10 +01:00
2019-12-13 08:43:11 +01:00
2019-05-30 11:26:32 -07:00
2019-04-18 22:15:03 +08:00
2019-07-08 20:57:08 -07:00
2019-08-22 14:57:33 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-06-17 16:40:31 +02:00
2019-05-30 11:26:32 -07:00
2019-04-18 22:15:02 +08:00
2019-12-13 08:43:09 +01:00
2019-04-18 22:15:02 +08:00
2021-03-04 10:26:25 +01:00
2021-01-12 20:16:17 +01:00
2019-05-30 11:26:32 -07:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-09-03 16:44:57 -04:00
2019-06-13 14:31:39 +08:00
2019-07-26 14:51:57 +10:00
2019-08-09 15:11:58 +10:00
2017-12-22 19:52:40 +11:00
2019-07-27 21:08:38 +10:00
2020-02-28 17:22:26 +01:00
2019-06-06 13:10:49 -07:00
2020-02-11 04:35:31 -08:00
2019-06-20 14:17:24 +08:00
2019-06-06 14:38:57 +08:00
2020-02-24 08:36:50 +01:00
2019-04-18 22:15:03 +08:00
2019-06-13 14:31:39 +08:00
2019-05-30 11:26:32 -07:00
2020-05-20 08:20:29 +02:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-12-31 16:43:38 +01:00
2019-06-13 14:31:39 +08:00
2019-06-13 14:31:39 +08:00
2013-12-09 20:09:12 +08:00
2019-07-08 20:57:08 -07:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-05-30 11:26:32 -07:00
2020-02-11 04:35:31 -08:00
2019-04-18 22:15:03 +08:00
2019-05-30 11:26:32 -07:00
2017-11-02 11:10:55 +01:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2021-05-11 14:04:15 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:27:11 +02:00
2016-07-05 23:05:26 +08:00
2015-10-14 22:23:16 +08:00
2019-04-18 22:15:03 +08:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2021-03-20 10:39:47 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-09-05 14:54:54 +10:00
2019-05-24 17:27:12 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:45 +02:00
2019-09-09 17:35:27 +10:00
2019-06-19 17:09:07 +02:00
2019-04-18 22:15:03 +08:00
2019-08-15 21:52:14 +10:00
2021-03-07 12:20:46 +01:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:57:08 -07:00
2020-02-14 16:34:18 -05:00
2019-08-30 18:05:27 +10:00
2019-07-08 20:57:08 -07:00
2019-05-21 11:28:45 +02:00
2019-05-21 11:28:45 +02:00
2019-04-18 22:15:03 +08:00
2019-06-13 14:31:39 +08:00
2019-05-21 11:28:45 +02:00
2019-05-24 17:27:13 +02:00
2020-05-20 08:20:29 +02:00
2019-06-06 14:38:57 +08:00
2019-07-08 20:57:08 -07:00