From 84fa569db9110436806f32e8bb7bed39d4aa3b41 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 19 Apr 2007 20:14:31 +0000 Subject: [PATCH] * Apply upstream patch to crashes on contention in afs_xuser when a process in a PAG exits. Thanks, Chaskiel Grundman. --- debian/changelog | 2 ++ src/afs/LINUX/osi_groups.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2c87928a1..059b59cb7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ openafs (1.4.4.dfsg1-2) unstable; urgency=low with i386 and amd64. Newer versions of glibc change internal structures in ways that cause the old LWP code to have stack overflows. (Closes: #419903) + * Apply upstream patch to crashes on contention in afs_xuser when a + process in a PAG exits. Thanks, Chaskiel Grundman. * When determining the AFS sysname for kernel module builds, add explicit cases for 2.6 kernels for all architectures that support them (everything except non-64-bit sparc_linux). Fixes build problems with diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index ab43b9cba..f1fc6bb26 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -595,13 +595,18 @@ static void afs_pag_destroy(struct key *key) { afs_uint32 pag = key->payload.value; struct unixuser *pu; + int locked = ISAFS_GLOCK(); + if (!locked) + AFS_GLOCK(); pu = afs_FindUser(pag, -1, READ_LOCK); if (pu) { pu->ct.EndTimestamp = 0; pu->tokenTime = 0; afs_PutUser(pu, READ_LOCK); } + if (!locked) + AFS_GUNLOCK(); } struct key_type key_type_afs_pag = -- 2.39.5