kernel - Fix shared/exclusive spinlock race
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 30 Jan 2017 17:37:58 +0000 (09:37 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 30 Jan 2017 17:50:19 +0000 (09:50 -0800)
commite22f2acdde96b31c8a0c99a09f739a0fb7f3fa2a
treee5e37b8c0903f1bba23ca654a5fba077b0fa7ca9
parente4b2227aac59276b85528ce4fd534df82d416af1
kernel - Fix shared/exclusive spinlock race

* Fix a long-standing bug in the shared spinlock code which could
  unintentionally cause a contending exclusive waiter to acquire its
  lock shared.

* Fixes a pmap issue exercised by the vkernel.

* The namecache also uses shared spinlocks but was far less likely to hit
  the bug.
sys/kern/kern_spinlock.c
sys/sys/spinlock2.h