From e95eedf99f9310ac08f001fc51fda6e5b7eab2d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 12 Oct 2006 06:59:25 +0000 Subject: [PATCH] DEVEL15-windows-scache-ref-leak-20061012 make sure the scache mutex is held across calls to cm_SyncOpDone (cherry picked from commit 2b96ba59194831ef298585c4f82d574a0790f3a6) --- 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 ea48cee17f..206adf5d1b 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1057,7 +1057,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); @@ -1917,7 +1919,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);