Skip to content

Make hosted File lifecycle dispatch reentrant-safe #56

Description

@stakach

Dependency of #17 before a live win32k ZwClose cutover.

Contract

  • Represent each CLEANUP/CLOSE dispatch as an owned, generation-checked File/IRP invocation. Record ownership before the driver effect. PR Own hosted File lifecycle dispatch before driver entry #58.
  • Release every mutable IoManager borrow before hosted component IPC; resume/commit only against the exact retained invocation after the reply, including uncertain outcomes and cancellation.
  • Permit a driver callback to initiate another final File close without aliasing the global manager or deadlocking behind a process-wide progress guard.
  • Preserve final-handle NtClose wait semantics, synchronous Busy ordering, and real CLEANUP then CLOSE completion. No synthetic success or retry of uncertain effects.
  • Add crate tests for nested dispatch, stale generation, ambiguous reply, cancellation, and independent driver/file owners; then native build and bounded boot. Report desktop proof separately.

Review finding: driver_launch::pump_io_manager holds a global &mut ExecutiveIoManager through IoManager::pump_with_report, whose deferred-close path dispatches hosted driver IPC. A reverse callback can reenter the same manager. The existing hosted-file retirement drain intentionally defers reentry, but that guard is not sufficient for a new final close after its PM handle effect.

PR #58 proved owned dispatch and ACK state in the crate (730 tests), native build, and unchanged bounded boot gate. Native integration, owned cancellation and ACK reconciliation remain open.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions