diff options
author | 2020-03-15 05:58:48 +0000 | |
---|---|---|
committer | 2020-03-15 05:58:48 +0000 | |
commit | bd53203435d6be1b76637605002405db48447d6e (patch) | |
tree | 73a16ce6670c3e821ec1d8fe224d28a1a4853295 /sys/dev | |
parent | Guard SIOCDELMULTI if_ioctl calls with KERNEL_LOCK() where the call is (diff) | |
download | wireguard-openbsd-bd53203435d6be1b76637605002405db48447d6e.tar.xz wireguard-openbsd-bd53203435d6be1b76637605002405db48447d6e.zip |
Fix memory corruption with kern.witness.locktrace.
The allocating of lock stacks does not handle correctly the case where
the system-wide free list becomes empty. Consequently, the returned
stack buffer can still be on the CPU's free list.
This patch fixes the bug by simplifying the code. Lock stack buffers are
now allocated and freed one by one from the system-wide free list
instead of using batching.
The fix additionally addresses a buffer hoarding problem that can arise
under workloads where some CPUs are net acquirers and some other CPUs
net releasers of rwlocks.
Panic reported by Hrvoje Popovski
Diffstat (limited to 'sys/dev')
0 files changed, 0 insertions, 0 deletions