summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-17 18:23:01 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-17 18:23:01 +0000
commit67b38012014bbc8774e04dd2942d6111b8e9f401 (patch)
treec70c44195eb6059f53972c7e9ba9611a49d608b9 /pkg
parent7126e351b80d9826a7b0eb29ad85d8036d311d54 (diff)
parentca829158e385c591d4be21c87cc6ab45116a7cce (diff)
Merge ca829158 (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/fs/inode_overlay.go10
-rwxr-xr-xpkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go3
-rwxr-xr-xpkg/sentry/platform/ring0/defs_impl.go2
-rwxr-xr-xpkg/sentry/time/seqatomic_parameters_unsafe.go3
4 files changed, 12 insertions, 6 deletions
diff --git a/pkg/sentry/fs/inode_overlay.go b/pkg/sentry/fs/inode_overlay.go
index 24b769cfc..e0602da17 100644
--- a/pkg/sentry/fs/inode_overlay.go
+++ b/pkg/sentry/fs/inode_overlay.go
@@ -339,7 +339,9 @@ func overlayRemove(ctx context.Context, o *overlayEntry, parent *Dirent, child *
}
}
if child.Inode.overlay.lowerExists {
- return overlayCreateWhiteout(o.upper, child.name)
+ if err := overlayCreateWhiteout(o.upper, child.name); err != nil {
+ return err
+ }
}
// We've removed from the directory so we must drop the cache.
o.markDirectoryDirty()
@@ -418,10 +420,12 @@ func overlayRename(ctx context.Context, o *overlayEntry, oldParent *Dirent, rena
return err
}
if renamed.Inode.overlay.lowerExists {
- return overlayCreateWhiteout(oldParent.Inode.overlay.upper, oldName)
+ if err := overlayCreateWhiteout(oldParent.Inode.overlay.upper, oldName); err != nil {
+ return err
+ }
}
// We've changed the directory so we must drop the cache.
- o.markDirectoryDirty()
+ oldParent.Inode.overlay.markDirectoryDirty()
return nil
}
diff --git a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go
index be6b07629..895abb129 100755
--- a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go
+++ b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go
@@ -1,11 +1,12 @@
package kernel
import (
+ "unsafe"
+
"fmt"
"gvisor.dev/gvisor/third_party/gvsync"
"reflect"
"strings"
- "unsafe"
)
// SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race
diff --git a/pkg/sentry/platform/ring0/defs_impl.go b/pkg/sentry/platform/ring0/defs_impl.go
index ea3f514cd..a36a17e37 100755
--- a/pkg/sentry/platform/ring0/defs_impl.go
+++ b/pkg/sentry/platform/ring0/defs_impl.go
@@ -2,13 +2,13 @@ package ring0
import (
"gvisor.dev/gvisor/pkg/cpuid"
+ "reflect"
"syscall"
"fmt"
"gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables"
"gvisor.dev/gvisor/pkg/sentry/usermem"
"io"
- "reflect"
)
var (
diff --git a/pkg/sentry/time/seqatomic_parameters_unsafe.go b/pkg/sentry/time/seqatomic_parameters_unsafe.go
index b4fb0a7f0..f6560d0bb 100755
--- a/pkg/sentry/time/seqatomic_parameters_unsafe.go
+++ b/pkg/sentry/time/seqatomic_parameters_unsafe.go
@@ -1,11 +1,12 @@
package time
import (
+ "unsafe"
+
"fmt"
"gvisor.dev/gvisor/third_party/gvsync"
"reflect"
"strings"
- "unsafe"
)
// SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race