OpenAFS CVS Commit: openafs/src/WINNT/afsd by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Thu, 12 Feb 2009 16:44:47 EST


Update of /cvs/openafs/src/WINNT/afsd
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-head/src/WINNT/afsd

Modified Files:
	smb.c smb3.c 
Log Message:
DELTA windows-smb-fidp-scp-race-20090212
AUTHOR jaltman@secure-endpoints.com
LICENSE MIT
FIXES 124293

As evident in a crash dump, there is a race surrounding access to the 
scp field of the smb_fid_t object.  Not all access was protected by 
the smb_fid_t mx and the cm_scache_t object was not always being 
reference counted within the accessing function.

This patch ensures that all initial references to the scp object
are performed under the smb_fid_t mx mutex and that the cm_scache_t
is prevented from being recycled by obtaining a local reference.

Finally, CM_ERROR_BADFD is returned as an error if a request begins
after the smb_fid_t scp field has already been cleared by a smb_CloseFID()
call as part of a concurrent request.



--- DELTA config follows ---
windows-smb-fidp-scp-race-20090212 openafs/src/WINNT/afsd/smb.c 1.235 1.236
windows-smb-fidp-scp-race-20090212 openafs/src/WINNT/afsd/smb3.c 1.181 1.182