kernel - Fix vmspace termination race (2)
* Fix a race and fix dangling cached mount points. At the point where
dounmount() checks to see if there are any dangling cache refs left
it has already dropped its own ref on the mp. The test, however,
was (refs > 1). The test needs to be (refs > 0).
This race was probably causing the corruption, and in fact its the
smoking gun because the mp->mnt_refs field is at the same offset as
the pmap->copyin field, and the pmap->copyin field was getting
corrupted by being decremented by 1.
* Fix a race where the unmount code was issuing tue dounmount() call
without any ref or hold on the mp. This race was unlikely (requires
two unmounts of the same partition at the same time).