OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_0b-244-g8ca5670

Gerrit Code Review
Fri, 16 Dec 2011 16:30:24 -0800 (PST)

The following commit has been merged in the openafs-stable-1_6_x branch:
commit 8ca56700a8c3835bc735f34e8e82476e7a4c0792
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 and 1.6 branches. 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 specific to 1.4 and 1.6. On the master branch, this
    issue is fixed by implementing unixuser locks in change
    Tested-by: BuildBot <>
    Reviewed-by: Derrick Brashear <>
    (cherry picked from commit 1465946bb6863430bf0efebd024d394549a8775f)
    Change-Id: Icab5176bf685c408447f0f32ad65c5b003299d3d
    Reviewed-by: Derrick Brashear <>
    Tested-by: BuildBot <>

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

OpenAFS Master Repository