From 2b96ba59194831ef298585c4f82d574a0790f3a6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 12 Oct 2006 06:57:40 +0000 Subject: [PATCH] windows-scache-ref-leak-20061012 make sure the scache mutex is held across calls to cm_SyncOpDone --- src/WINNT/afsd/cm_ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 0bbe4d8f65..695d8334ac 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1039,7 +1039,9 @@ long cm_IoctlDeleteMountPoint(struct smb_ioctl *ioctlp, struct cm_user *userp) dscp, cp, NULL, TRUE); done1: + lock_ObtainMutex(&scp->mx); cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS); + lock_ReleaseMutex(&scp->mx); done2: cm_ReleaseSCache(dscp); @@ -1899,7 +1901,9 @@ long cm_IoctlDeletelink(struct smb_ioctl *ioctlp, struct cm_user *userp) dscp, cp, NULL, TRUE); done1: + lock_ObtainMutex(&scp->mx); cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS); + lock_ReleaseMutex(&scp->mx); done2: cm_ReleaseSCache(dscp);