mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Issue a panic in the case of a failed mount promise.
Failing to resolve a mount promise is never expected behavior. The sandbox should crash in this case, since something has gone fatally wrong. PiperOrigin-RevId: 552652799
This commit is contained in:
committed by
gVisor bot
parent
1d4792c566
commit
e77ec6e719
@@ -47,7 +47,6 @@ import (
|
||||
"gvisor.dev/gvisor/pkg/errors/linuxerr"
|
||||
"gvisor.dev/gvisor/pkg/eventchannel"
|
||||
"gvisor.dev/gvisor/pkg/fspath"
|
||||
"gvisor.dev/gvisor/pkg/log"
|
||||
"gvisor.dev/gvisor/pkg/sentry/fsmetric"
|
||||
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
|
||||
"gvisor.dev/gvisor/pkg/sentry/socket/unix/transport"
|
||||
@@ -947,7 +946,7 @@ func (vfs *VirtualFilesystem) maybeBlockOnMountPromise(ctx context.Context, rp *
|
||||
rp.start = newMnt.root
|
||||
rp.flags = rp.flags&^rpflagsHaveStartRef | rpflagsHaveMountRef
|
||||
case <-time.After(mountPromiseTimeout):
|
||||
log.Warningf("mount promise for %s timed out, proceeding with VFS operation", path)
|
||||
panic(fmt.Sprintf("mount promise for %s timed out, unable to proceed", path))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user