summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/fs.go
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-06-03 12:33:51 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-03 12:35:13 -0700
commit7da69fe9719b26f5d15e80b2764459c4cac80b0e (patch)
treeca79e3feee532997575a12c963ac8f5be329627b /pkg/sentry/fs/fs.go
parentb2e2a081a8a180764677111ae3c0b6179be81d31 (diff)
Fix data race on f.offset.
We must hold f.mu to write f.offset. PiperOrigin-RevId: 314582968
Diffstat (limited to 'pkg/sentry/fs/fs.go')
-rw-r--r--pkg/sentry/fs/fs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/fs/fs.go b/pkg/sentry/fs/fs.go
index bdba6efe5..d2dbff268 100644
--- a/pkg/sentry/fs/fs.go
+++ b/pkg/sentry/fs/fs.go
@@ -42,9 +42,10 @@
// Dirent.dirMu
// Dirent.mu
// DirentCache.mu
-// Locks in InodeOperations implementations or overlayEntry
// Inode.Watches.mu (see `Inotify` for other lock ordering)
// MountSource.mu
+// Inode.appendMu
+// Locks in InodeOperations implementations or overlayEntry
//
// If multiple Dirent or MountSource locks must be taken, locks in the parent must be
// taken before locks in their children.