mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
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
This commit is contained in:
parent
0eaa8d153a
commit
14132a5b80
|
|
@ -444,7 +444,7 @@ static long sgx_ioc_enclave_add_pages(struct sgx_encl *encl, void __user *arg)
|
|||
for (c = 0 ; c < add_arg.length; c += PAGE_SIZE) {
|
||||
if (signal_pending(current)) {
|
||||
if (!c)
|
||||
ret = -EINTR;
|
||||
ret = -ERESTARTSYS;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user