On Thu, Aug 08, 2019 at 06:50:08PM +0300, Jarkko Sakkinen wrote: > On Wed, Aug 07, 2019 at 05:12:54PM -0700, Sean Christopherson wrote: > > Add sgx_encl_shrink() to pair with sgx_encl_grow() and use it to adjust > > the VA page count when ECREATE or EADD fails. Return the allocated VA > > page from sgx_encl_grow() so that it can be freed during shrink. > > > > Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> > > Acked-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx> This missed wrapping -ENOMEM with ERR_PTR() when va_page alloation fails. Let me know if you want me to send a v2 or if you'll fix it up when applying.