Windows: AFSSetRenameInfo Drop TreeLocks MmForceSectionClosed
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 5 Dec 2012 18:07:08 +0000 (13:07 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 6 Dec 2012 05:10:25 +0000 (21:10 -0800)
commita774fa8a6acf44b19e566c2da1bb416ef5d2983c
tree2499bed8b6c329429d61f6bdafd84febe28b583b
parentb338928bd4663a50963b24d38d337cd1c9f4b87e
Windows: AFSSetRenameInfo Drop TreeLocks MmForceSectionClosed

If the Target directory TreeLock is held across the
MmForceSectionClosed() call in AFSSetRenameInfo() Trend Micro's
TmPreFlt!TmpQueryFullName call can deadlock in its worker thread
when AFSCommonCreate() attempts to AFSLocateNameEntry() which
requires shared access to the TreeLock for the search.

Reorganize the Target Entry Exists case to call MmForceSectionClosed()
after the directory entry has been deleted.  That should throw
a monkey wrench into Trend Micro's attempt to scan it.

Change-Id: Ib8d4777fde257c0f2c93e2577caa6542c1b08c79
Reviewed-on: http://gerrit.openafs.org/8607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp