mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 14:07:39 +00:00
Windows: When processing pioctl paths ensure callbacks are obtained
When processing a pioctl path with either smb_ParseIoctlPath or smb_ParseIoctlParent, cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK|GETSTATUS) must be called on the cm_scache_t object to ensure that it is up to date before we permit cm_Lookup or other operations to be performed on it. Add the cm_SyncOp() call to smb_ParseIoctlPath and smb_ParseIoctlParent to ensure it is done for all pioctl operations. LICENSE MIT Change-Id: I2fe5d5ec2567693155277b40929dedb8155d9ebf Reviewed-on: http://gerrit.openafs.org/2504 Tested-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
fccd35961f
commit
a03f1960da
@ -753,11 +753,19 @@ smb_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
|
||||
if (substRootp)
|
||||
cm_ReleaseSCache(substRootp);
|
||||
|
||||
/* and return success */
|
||||
osi_Log1(afsd_logp,"cm_ParseIoctlPath [8] code 0x%x", code);
|
||||
|
||||
if (relativePath)
|
||||
free(relativePath);
|
||||
|
||||
/* Ensure that the status object is up to date */
|
||||
lock_ObtainWrite(&(*scpp)->rw);
|
||||
code = cm_SyncOp( *scpp, NULL, userp, reqp, 0,
|
||||
CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
|
||||
if (code == 0)
|
||||
cm_SyncOpDone( *scpp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
|
||||
lock_ReleaseWrite(&(*scpp)->rw);
|
||||
|
||||
/* and return success */
|
||||
osi_Log1(afsd_logp,"cm_ParseIoctlPath [8] code 0x%x", code);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -920,6 +928,14 @@ smb_ParseIoctlParent(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
|
||||
code = (long)strlen(ioctlp->ioctl.inDatap) + 1;
|
||||
ioctlp->ioctl.inDatap += code;
|
||||
|
||||
/* Ensure that the status object is up to date */
|
||||
lock_ObtainWrite(&(*scpp)->rw);
|
||||
code = cm_SyncOp( *scpp, NULL, userp, reqp, 0,
|
||||
CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
|
||||
if (code == 0)
|
||||
cm_SyncOpDone( *scpp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
|
||||
lock_ReleaseWrite(&(*scpp)->rw);
|
||||
|
||||
/* and return success */
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user