From: Michael Meffie Date: Thu, 11 Nov 2010 17:17:05 +0000 (-0500) Subject: viced: fix missing host lock in h_Enumerate X-Git-Tag: openafs-devel-1_7_1~1282 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=c8dc68299d47ae4d7f0c9a1354de9ddd37ff86fc viced: fix missing host lock in h_Enumerate The global host lock must be held over h_Release_r. Fix the the case in h_Enumerate where h_Release_r is called without the global host lock held. Change-Id: I010338edf0a515f543e3468afff907e97eb07163 Reviewed-on: http://gerrit.openafs.org/3294 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/host.c b/src/viced/host.c index 63502a1..0d62f84 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1014,7 +1014,9 @@ h_Enumerate(int (*proc) (struct host*, int, void *), void *param) H_UNLOCK; for (i = 0; i < count; i++) { flags[i] = (*proc) (list[i], flags[i], param); + H_LOCK; h_Release_r(list[i]); + H_UNLOCK; /* bail out of the enumeration early */ if (H_ENUMERATE_ISSET_BAIL(flags[i])) break;