summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-20 21:04:26 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-20 21:04:26 -0700
commit5bbc22797147bb83f9698b337522059099153fd7 (patch)
tree285aa0cd4e0375747f764fe6407ade582687e0ff /pkg/sentry/kernel
parent28c78eb03ce95bd39ee6b8c6bea6482c9be11edf (diff)
parent06d6dc36025fcfa62fa5a921eccf5359e476f6fc (diff)
Merge pull request #6037 from sudo-sturbia:doc
PiperOrigin-RevId: 375007632
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r--pkg/sentry/kernel/semaphore/semaphore.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/semaphore/semaphore.go b/pkg/sentry/kernel/semaphore/semaphore.go
index fe2ab1662..3c5bd8ff7 100644
--- a/pkg/sentry/kernel/semaphore/semaphore.go
+++ b/pkg/sentry/kernel/semaphore/semaphore.go
@@ -702,7 +702,9 @@ func (s *Set) checkPerms(creds *auth.Credentials, reqPerms fs.PermMask) bool {
return s.checkCapability(creds)
}
-// destroy destroys the set. Caller must hold 's.mu'.
+// destroy destroys the set.
+//
+// Preconditions: Caller must hold 's.mu'.
func (s *Set) destroy() {
// Notify all waiters. They will fail on the next attempt to execute
// operations and return error.