Re: [PATCH] x86/sgx: Drop enclave reference on MMU notifier registration failure

From: Markus Elfring

Date: Thu Aug 20 2026 - 08:35:28 EST



> Drop the enclave reference before freeing the unpublished encl_mm. This
> balances the acquisition without changing the successful registration
> and teardown paths.


How do you think about to increase the application of scope-based resource management
also for an improved implementation of a function like sgx_encl_mm_add()?

Regards,
Markus