kata-proc-manager: small code shuffle

Move the container slot release up as it logically belongs with the
seL4BundleImpl construction. This makes clear it's unrelated to the
actual start operation.

Change-Id: Idda2a4a829fe6fae2a4d1dbe99aff495ef10b3b8
GitOrigin-RevId: ba2cdc9f4bfb54cfbeca11888bd31cd5657d0182
This commit is contained in:
Sam Leffler 2022-06-23 03:15:49 +00:00
parent b0d1b6efac
commit 272c18cf9b

View File

@ -141,12 +141,12 @@ impl ProcessManagerInterface for KataManagerInterface {
let bundle_frames =
kata_security_load_application(&bundle.app_id, &container_slot)?;
let mut sel4_bundle = seL4BundleImpl::new(bundle, &bundle_frames)?;
sel4_bundle.start()?;
// sel4_bundle owns container_slot now; release our ref so it's not
// reclaimed when container_slot goes out of scope.
container_slot.release();
sel4_bundle.start()?;
Ok(Box::new(sel4_bundle) as _)
}
fn stop(&mut self, bundle_impl: &mut dyn BundleImplInterface) -> Result<(), ProcessManagerError> {