Windows: prevent cm_server races
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 14 Aug 2011 04:14:10 +0000 (00:14 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 14 Aug 2011 18:34:07 +0000 (11:34 -0700)
commitc20010850e2b43a0b9a6d74357ea6111dbf3409e
tree551fb5f7d467dcca5e1bbb551762e5c1039c6287
parent10d27341808be41b29fbcc09b8bd7523c3b7a541
Windows: prevent cm_server races

Use interlocked operations to modified the flags field.

Close a race in cm_NewServer() which can result in multiple
cm_server objecs being created for the same addr/port/type
tuple.

Change-Id: Ia26e21e1f007875ce316d2ae45a1fbf6fed835f9
Reviewed-on: http://gerrit.openafs.org/5266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm_callback.c
src/WINNT/afsd/cm_cell.c
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_server.c
src/WINNT/afsd/cm_server.h
src/WINNT/afsd/cm_volume.c