kernel - Fix cluster_awrite() race
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Oct 2017 22:14:02 +0000 (15:14 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Oct 2017 22:14:02 +0000 (15:14 -0700)
commitc3c895a62193e0eb34749eb6e20a7957eb66ea40
tree128d783821270d15610bf6e85cfa75f2089e4ea6
parent3a80fe2b3b31f537127b5393af89a549c4d815d9
kernel - Fix cluster_awrite() race

* Fix a race between cluster_awrite() and vnode destruction.  We
  have to finish working the cluster pbuf before disposing of the
  component elements.  b_vp in the cluster pbuf is held only by
  the presence of the components.

* Fixes NULL pointer indirection panic associated with heavy
  paging during tmpfs operations.  This typically only occurs
  when maxvnodes is set to a relatively low value, but it can
  eventually occur in any modestly paging environment when
  tmpfs is used.
sys/kern/vfs_cluster.c