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

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Thu, 12 Feb 2009 16:45:00 EST


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

Modified Files:
      Tag: openafs-devel-1_5_x
	smb.c smb3.c 
Log Message:
DELTA DEVEL15-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 for openafs-devel-1_5_x follows ---
DEVEL15-windows-smb-fidp-scp-race-20090212 openafs/src/WINNT/afsd/smb.c 1.118.2.114 1.118.2.115
DEVEL15-windows-smb-fidp-scp-race-20090212 openafs/src/WINNT/afsd/smb3.c 1.95.2.86 1.95.2.87