kernel - Fix SMP race in procfs
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 13 Nov 2018 19:10:47 +0000 (11:10 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 13 Nov 2018 19:10:47 +0000 (11:10 -0800)
commitf21197177101972ecc2bb045a2c4bbf0ab7ee0b0
treedc57efe528fc0e138b2cecd1532c65a02869fc16
parentfb15202ca65065a9db8fb9fd523efd6e11c370c7
kernel - Fix SMP race in procfs

* procfs was not locking its pid hash table.  Implement a per-slot
  spinlock.  The hash is populated only for pid directories that are
  pushed into (e.g. ls /proc/<pid> vs ls /proc).

* Fixes a fairly rare crash that can only occur when procfs is used
  heavily.
sys/vfs/procfs/procfs_subr.c