OpenAFS Master Repository branch, openafs-stable-1_4_x, updated. openafs-stable-1_4_12-117-g1465946

Gerrit Code Review
Sun, 22 May 2011 07:02:41 -0700 (PDT)

The following commit has been merged in the openafs-stable-1_4_x branch:
commit 1465946bb6863430bf0efebd024d394549a8775f
Author: Andrew Deason <>
Date:   Wed May 4 12:34:20 2011 -0500

    libafs: Avoid using changing unixuser ticket data
    PSetTokens was afs_osi_Alloc'ing after afs_osi_Free'ing the previous
    token data. This can sleep, causing tu->stp to be pointing to garbage
    while we wait to alloc. Additionally, rxkad_NewClientSecurityObject
    can sleep while waiting to alloc memory, and so the given tu->stp
    pointer given to it by afs_ConnBySA may be invalid by the time it
    actually uses the data.
    To fix this, we could implement unixuser locking to ensure mutual
    exclusion of these events. However, this implements a more
    conservative change for the 1.4 branch. In PSetTokens we alloc the new
    memory before we change anything, and in afs_ConnBySA we make copies
    of the ticket data before giving it to rxkad. With these changes, the
    glock gives us enough serialization to avoid issues with tu->stp
    changing underneath us.
    This change is 1.4-specific. On the master branch, this issue is fixed
    by implementing unixuser locks in change
    Change-Id: I3eb59e611531eca8105cf4d4f67eb1bb1196fd9c
    Tested-by: BuildBot <>
    Reviewed-by: Derrick Brashear <>

 src/afs/afs_conn.c   |   18 +++++++++++++++---
 src/afs/afs_pioctl.c |   27 +++++++++++++++++----------
 2 files changed, 32 insertions(+), 13 deletions(-)

OpenAFS Master Repository