crosvm/swap
Shintaro Kawamura 1a00bde75f swap: add SwapDeviceHelper for forking grand-child processes
Hotplug devices are forked from JailWarden process due to minijail
workaround. It is possible to pass `&mut SwapController` to the
JailWarden process on forking, but the ownership of the reference is not
clear. The actual ownership of the object is cloned when forking at the
higher call stack, however it is not clear for readers.

Introduce swap::SwapDeviceHelper to make the ownership clear. The
JailWarden process will hold the ownership of swap::SwapDeviceHelper.

BUG=b:266898615
TEST=./tools/run_tests2

Change-Id: I64edf9e41a70edfd156bcca060656b5641d785fb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4560804
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: Ningyuan Wang <ningyuan@google.com>
2023-05-26 01:39:53 +00:00
..
src swap: add SwapDeviceHelper for forking grand-child processes 2023-05-26 01:39:53 +00:00
tests swap: make swap/enable not default 2023-05-12 06:15:16 +00:00
Cargo.toml swap: make swap/enable not default 2023-05-12 06:15:16 +00:00