mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
9ab4f29e7a
A previous commit moved the creation of the executor for the vhost-user
device processes before the minijail jail_and_fork() call, and the file
descriptor of the executor was not marked for preservation when entering
the jail, so running the vhost-user-fs device would result in errors
like this:
[WARNING:cros_async/src/sys/unix/uring_executor.rs:343] Failed to
submit NOP for waking up executor: Failed to enter io uring: 9
This is because the io_uring context file descriptor was no longer
valid, so uring system calls would return 9 (EBADF).
Add AsRawDescriptors implementations to UringExecutor and FdExecutor so
we can preserve the fd across the minijail fork.
Other vhost-user devices were not affected because they don't enter a
jail; the fs device requires this so it can do uid/gid remapping.
BUG=b:231396155
TEST=crosvm device fs --socket /tmp/vhost.sock --tag test --shared-dir /
Fixes:
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml |