Hold the VolumeCB->ObjectInfoTree.TreeLock exclusively when calling
AFSAllocateObjectInfo() in order to protect the lists of child objects.
Change-Id: I16f104b8112e972fa8c60da2b0dbcb07ad42456c
Reviewed-on: http://gerrit.openafs.org/9723
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
__Enter
{
+ AFSAcquireExcl( ParentObjectInfo->VolumeCB->ObjectInfoTree.TreeLock,
+ TRUE);
+
pObjectInfoCB = AFSAllocateObjectInfo( ParentObjectInfo,
0);
if( pObjectInfoCB == NULL)
{
+ AFSReleaseResource( ParentObjectInfo->VolumeCB->ObjectInfoTree.TreeLock);
+
try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
}
pObjectInfoCB,
lCount));
+ AFSReleaseResource( ParentObjectInfo->VolumeCB->ObjectInfoTree.TreeLock);
+
pObjectInfoCB->FileType = (ULONG) AFS_FILE_TYPE_PIOCTL;
pObjectInfoCB->FileAttributes = FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM;