OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_0b-244-g8ca5670
Gerrit Code Review
gerrit@openafs.org
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 <adeason@sinenomine.net>
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
Idd66d72f716b7e7dc08faa31ae43e9a23639bae3.
Reviewed-on: http://gerrit.openafs.org/4649
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1465946bb6863430bf0efebd024d394549a8775f)
Change-Id: Icab5176bf685c408447f0f32ad65c5b003299d3d
Reviewed-on: http://gerrit.openafs.org/6345
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_conn.c | 20 +++++++++++++++++---
src/afs/afs_pioctl.c | 27 +++++++++++++++++----------
2 files changed, 34 insertions(+), 13 deletions(-)
--
OpenAFS Master Repository