Windows: Trend Micro QueryDirectory deadlock
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 22 Nov 2012 16:52:11 +0000 (11:52 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 24 Nov 2012 03:23:32 +0000 (19:23 -0800)
commitc3ed4794c1ed7db14b67eb0c3bb65c1aed18ff35
treed669307deaf988f65dc01ea9cf078886c2f218c2
parentd733f9daed95feef2eefb3d68dc16607b1321142
Windows: Trend Micro QueryDirectory deadlock

Trend Micro will deadlock both itself and the AFS redirector by
calling a worker thread to generate a temporary file name during
an active FindFirst Directory Query.  The Trend Micro worker will
also attempt to enumerate the directory.   If the directory contains
an entry for which the data version as reported by the service is
different than the data version in the ObjectInformationCB a deadlock
will occur on the matching FileCB Resource.

To avoid this deadlock, prevent AFSValidateEntry from purging or
updating the ObjectInformationCB and FileObject information when
called from AFSQueryDirectory.

Change-Id: I8f2f7136796759eb91dadfea34a89513c1a1fff4
Reviewed-on: http://gerrit.openafs.org/8492
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp
src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/Include/AFSCommon.h