summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/gofer/gofer_test.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-08-07 18:32:03 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-07 18:41:48 -0700
commit343661770aa96efe3b539a82addff13df235413f (patch)
treec394c500c71ce4c1676cb315343d39c701ece4ad /pkg/sentry/fsimpl/gofer/gofer_test.go
parent8f6d576afe2e9e3fea7d792fd0b0d3f426b8d1b4 (diff)
Don't hold gofer.filesystem.renameMu during dentry destruction.
PiperOrigin-RevId: 325546629
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/gofer_test.go')
-rw-r--r--pkg/sentry/fsimpl/gofer/gofer_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/gofer/gofer_test.go b/pkg/sentry/fsimpl/gofer/gofer_test.go
index 36cca3625..bfe75dfe4 100644
--- a/pkg/sentry/fsimpl/gofer/gofer_test.go
+++ b/pkg/sentry/fsimpl/gofer/gofer_test.go
@@ -52,6 +52,8 @@ func TestDestroyIdempotent(t *testing.T) {
}
parent.cacheNewChildLocked(child, "child")
+ fs.renameMu.Lock()
+ defer fs.renameMu.Unlock()
child.checkCachingLocked(ctx)
if got := atomic.LoadInt64(&child.refs); got != -1 {
t.Fatalf("child.refs=%d, want: -1", got)