This variable provides a mask of all registered entropy sources and is
updated when drivers attach and detach (or by sysctl). However, nothing
was synchronizing accesses to it. Use the harvest lock to provide
mutual exclusion for updates, and use atomic_load_int() to mark unlocked
reads.
Details
Details
- Reviewers
cem - Group Reviewers
csprng - Commits
- rG730b6d166bfe: random: Fix synchronization of hc_source_mask
rGc942d9e83ef1: random: Fix synchronization of hc_source_mask
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
- Add a comment above hc_source_mask.
- Load the mask once before looping over its bits.