]> git.michaelhowe.org Git - packages/o/openafs.git/commit
afs: Do not QueueVCB before osi_dnlc_purge*
authorAndrew Deason <adeason@sinenomine.net>
Fri, 18 May 2012 21:40:38 +0000 (17:40 -0400)
committerDerrick Brashear <shadow@dementix.org>
Tue, 29 May 2012 00:33:12 +0000 (17:33 -0700)
commit93f9c397a22b6fa4ad0bf5b0c497380732b60165
tree1776a86b52bbf9ee580f6c89ab80f4bdbedd3c2a
parent8c99f6de5d6a7701f6b2b7cd8ba5b9a808d79946
afs: Do not QueueVCB before osi_dnlc_purge*

In afs_FlushVCache, when we QueueVCB, we might drop the afs_xvcache
lock (as of 76158df491f47de56d1febe1d1d2d17d316c9a74). The vcache may
still be on the DNLC, so a lookup while xvcache is dropped can cause
someone else to grab a reference to the vcache while it is being
flushed. This can cause panics and failed assertions, since someone
will have a reference to the flushed vcache, which is effectively
freed and many of the structure fields are no longer valid.

So instead, do not call QueueVCB until we have purged the vcache from
the DNLC.

Reviewed-on: http://gerrit.openafs.org/7430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 0e81db38b549d79a3af5fce0f9f8fa48d9e6efeb)

Change-Id: Idabad9076c6c36bede3faf459abb940aae5a975c
Reviewed-on: http://gerrit.openafs.org/7502
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/afs_vcache.c