On Tue, Aug 27, 2019 at 12:27:13PM -0700, Sean Christopherson wrote: > @@ -77,7 +78,7 @@ static int sgx_release(struct inode *inode, struct file *file) > }; > > mutex_lock(&encl->lock); > - encl->flags |= SGX_ENCL_DEAD; > + atomic_or(SGX_ENCL_DEAD, &encl->flags); > mutex_unlock(&encl->lock); Had a couple of checkpatch.pl errors (not a biggie, just a remark). Is there reason to keep lock there? /Jarkko