]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libafs: Get rx conn ref with afs conn ref
authorAndrew Deason <adeason@sinenomine.net>
Thu, 5 May 2011 16:18:08 +0000 (11:18 -0500)
committerDerrick Brashear <shadow@dementix.org>
Sun, 14 Aug 2011 02:15:57 +0000 (19:15 -0700)
commit5abed0aa67092cc488a8f8a343282188f00297e0
treed194f5e82e9ca5ba275f7d60032133b0c0c808e9
parentd215fa3b57acaeac54d88f078bf210e3fd7b0866
libafs: Get rx conn ref with afs conn ref

When we get a reference to an afs_conn with afs_Conn and its variants,
we assume we can use the tc->id rx connection without holding any
locks. However, if tc->forceConnectFS gets set, the tc->id connection
can be destroyed and recreated out from under us. So, to avoid using a
possibly freed rx connection, grab a reference to the rx connection at
the same time as we grab a reference to the afs conn. And also put
back the same reference with afs_PutConn.

(cherry picked from commit 03f0c656c1734b9be4debdf19b8f10771ff4420a)
Reviewed-on: http://gerrit.openafs.org/4625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: If19a267e23941e3305f4f13cd91a0935d214f1b1
Reviewed-on: http://gerrit.openafs.org/5232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
20 files changed:
src/afs/VNOPS/afs_vnop_create.c
src/afs/VNOPS/afs_vnop_dirops.c
src/afs/VNOPS/afs_vnop_flock.c
src/afs/VNOPS/afs_vnop_link.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/VNOPS/afs_vnop_remove.c
src/afs/VNOPS/afs_vnop_rename.c
src/afs/VNOPS/afs_vnop_symlink.c
src/afs/afs_analyze.c
src/afs/afs_bypasscache.c
src/afs/afs_conn.c
src/afs/afs_dcache.c
src/afs/afs_disconnected.c
src/afs/afs_fetchstore.c
src/afs/afs_pioctl.c
src/afs/afs_prototypes.h
src/afs/afs_segments.c
src/afs/afs_server.c
src/afs/afs_vcache.c
src/afs/afs_volume.c