summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2020-12-04 08:17:39 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-04 08:20:08 -0800
commit6708c8c97e4ede29935c8d3e809c7bb76309112c (patch)
treea20454821a686aa53678559640f56c7a5a201a0a /pkg/sentry/fs
parenta78cef0ed7ce15583424f5873f0aa6fdad1d5c2f (diff)
Require sync.RWMutex to lock and unlock from the same goroutine
This is the RWMutex equivalent to the preceding sync.Mutex CL. Updates #4804 PiperOrigin-RevId: 345681051
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r--pkg/sentry/fs/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fs/fs.go b/pkg/sentry/fs/fs.go
index d2dbff268..a020da53b 100644
--- a/pkg/sentry/fs/fs.go
+++ b/pkg/sentry/fs/fs.go
@@ -65,7 +65,7 @@ var (
// runs with the lock held for reading. AsyncBarrier will take the lock
// for writing, thus ensuring that all Async work completes before
// AsyncBarrier returns.
- workMu sync.RWMutex
+ workMu sync.CrossGoroutineRWMutex
// asyncError is used to store up to one asynchronous execution error.
asyncError = make(chan error, 1)