Module Name: src Committed By: riastradh Date: Wed Mar 23 23:18:18 UTC 2022
Modified Files: src/sys/kern: kern_entropy.c Log Message: entropy(9): Bind to CPU temporarily to avoid race with lwp migration. More fallout from the IPL_VM->IPL_SOFTSERIAL change. In entropy_enter, there is a window when the lwp can be migrated to another CPU: ec = entropy_cpu_get(); ... pending = ec->ec_pending + ...; ... entropy_cpu_put(); /* lwp migration possible here */ if (pending) entropy_account_cpu(ec); If this happens, we may trip over any of several problems in entropy_account_cpu because it assumes ec is the current CPU's state in order to decide whether we have anything to contribute from the local pool to the global pool. No need to do this in entropy_softintr because softints are bound to the CPU anyway. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/kern/kern_entropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.