Message ID | 20190808001254.11926-4-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/sgx: Bug fixes for v22 | expand |
On Wed, Aug 07, 2019 at 05:12:46PM -0700, Sean Christopherson wrote: > Ensure the local ret variable is set to zero when being returned via the > success path. > > Reported-by: Shay Katz-zamir <shay.katz-zamir@intel.com> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> /Jarkko
diff --git a/arch/x86/kernel/cpu/sgx/driver/ioctl.c b/arch/x86/kernel/cpu/sgx/driver/ioctl.c index 89b3fb81c15b..ebb71eb3323a 100644 --- a/arch/x86/kernel/cpu/sgx/driver/ioctl.c +++ b/arch/x86/kernel/cpu/sgx/driver/ioctl.c @@ -810,6 +810,7 @@ static long sgx_ioc_enclave_set_attribute(struct file *filep, void __user *arg) } encl->allowed_attributes |= SGX_ATTR_PROVISIONKEY; + ret = 0; out: fput(attribute_file);
Ensure the local ret variable is set to zero when being returned via the success path. Reported-by: Shay Katz-zamir <shay.katz-zamir@intel.com> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- arch/x86/kernel/cpu/sgx/driver/ioctl.c | 1 + 1 file changed, 1 insertion(+)