kernel - Fix rare race in namecache
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Feb 2013 17:50:22 +0000 (09:50 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Feb 2013 17:50:22 +0000 (09:50 -0800)
commit8214af3d1fa31993e6cd9ea091716b93f78dc50a
tree6c73a7cbcabcfc2d2821300a3d8ba7f3de63dc5f
parent4a0e0cd7377c45dc21d5c71bcab931b5e5727e74
kernel - Fix rare race in namecache

* Fix a rare race in _cache_cleanneg() where the ncp being cleaned up is
  resolved during the moment between where _cache_cleanneg() accesses it
  prior to locking and removing it.

* _cache_cleanneg() needed to re-check that the ncp was still on the
  negative cache list.

Reported-by: marino
sys/kern/vfs_cache.c