x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages()
authorJarkko Sakkinen <jarkko@kernel.org>
Wed, 18 Nov 2020 21:39:32 +0000 (23:39 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 19 Nov 2020 09:51:24 +0000 (10:51 +0100)
commit14132a5b807bb5caf778fe7ae1597e630971e949
tree3018b699e0601055b6187b1b066729261c1a08b5
parent0eaa8d153a1d573e53b8283c90db44057d1376f6
x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages()

Return -ERESTARTSYS instead of -EINTR in sgx_ioc_enclave_add_pages()
when interrupted before any pages have been processed. At this point
ioctl can be obviously safely restarted.

Reported-by: Haitao Huang <haitao.huang@intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20201118213932.63341-1-jarkko@kernel.org
arch/x86/kernel/cpu/sgx/ioctl.c