kernel - kmemstatistics list wasn't MPSAFE
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 17 Jan 2017 22:52:22 +0000 (14:52 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 17 Jan 2017 22:52:22 +0000 (14:52 -0800)
commit1cc73057b2d7affae9eab696a8e16b0c843b6065
tree7a850cb4d816f7976b3550e005ab81ce33b550d1
parent515677e172d254e08fc5169f5380b5f6795dc3a4
kernel - kmemstatistics list wasn't MPSAFE

* Put a spinlock around the kmemstatistics list.  This list is modified
  whenever a kmalloc area is created or destroyed, and this generally does
  not happen concurrently except with kernels run by expert hackers like
  us and get scared.

* ...Or if a machine is running synth and/or doing a lot of concurrent
  tmpfs mounts and unmounts.

Reported-by: swildner
sys/kern/kern_slaballoc.c