OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_72-40-g4dfbbd3

Gerrit Code Review gerrit@openafs.org
Mon, 22 Feb 2010 10:32:13 -0800 (PST)


The following commit has been merged in the master branch:
commit 4dfbbd34ce66c09593a0b1a88831ec0f36848fe8
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri Feb 12 16:30:44 2010 -0600

    Correct the h_Enumerate_r hostList safety check
    
    Ide1e5aca7c2c4a4af3f62bc07821db694f2f9999 added safety checks for a few
    traversals through hostList, including the traversal in h_Enumerate_r.
    Unfortunately, h_Enumerate_r may not hold H_LOCK over its entire
    traversal (h_Release_r can drop and reacquire it), so the value of
    hostCount is not guaranteed to stay the same.
    
    A host may be deleted during the loop, or right near the end, decreasing
    hostCount to below our current running 'count' of hosts, triggering the
    panic unnecessarily.
    
    Also, we break out of the loop if the H_ENUMERATE_ISSET_BAIL test
    succeeds, making the panic also incorrectly trigger then.
    
    So instead, remember the value of hostCount, and ensure that we've
    actually exceeded that count in the post-loop check.
    
    Change-Id: I7c13bbf111b592df6860e5852807fa463c3ebd7e
    Reviewed-on: http://gerrit.openafs.org/1304
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>

 src/viced/host.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

-- 
OpenAFS Master Repository