NetBSD/sys/crypto/cprng_fast
riastradh 1242a10b26 cprng_fast(9): Drop and retake percpu reference across cprng_strong.
cprng_strong may sleep on an adaptive lock (via entropy_extract),
which invalidates percpu(9) references.

Discovered by stumbling upon this panic in a test run:

panic: kernel diagnostic assertion "(cprng == percpu_getref(cprng_fast_percpu)) && (percpu_putref(cprng_fast_percpu), true)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/librump/rumpkern/../../../crypto/cprng_fast/cprng_fast.c", line 117

XXX pullup-10
2023-08-05 11:39:18 +00:00
..
cprng_fast.c cprng_fast(9): Drop and retake percpu reference across cprng_strong. 2023-08-05 11:39:18 +00:00
cprng_fast.h
files.cprng_fast Rewrite cprng_fast in terms of new ChaCha API. 2020-07-28 20:15:07 +00:00