Message ID | 20161201205632.8593-2-jarkko.sakkinen@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/platform/x86/intel_sgx_ioctl.c b/drivers/platform/x86/intel_sgx_ioctl.c index d54c410..db17b9f 100644 --- a/drivers/platform/x86/intel_sgx_ioctl.c +++ b/drivers/platform/x86/intel_sgx_ioctl.c @@ -575,6 +575,7 @@ static long sgx_ioc_enclave_create(struct file *filep, unsigned int cmd, vma->vm_start != secs->base || vma->vm_end != (secs->base + secs->size)) { ret = -EINVAL; + up_read(¤t->mm->mmap_sem); goto out; } encl->vma_cnt++;
up_read(¤t->mm->mmap_sem) was missing when the VMA validation fails. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> --- drivers/platform/x86/intel_sgx_ioctl.c | 1 + 1 file changed, 1 insertion(+)