The flags field of kvm_clock_data is supposed to indicate the
availability of additional fields one day. There are none yet, so clear
it. Moreover, drop the bogus check of this field and return 0 on
success.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
ktime_get_ts(&now);
now_ns = timespec_to_ns(&now);
user_ns.clock = kvm->arch.kvmclock_offset + now_ns;
+ user_ns.flags = 0;
+ r = -EFAULT;
if (copy_to_user(argp, &user_ns, sizeof(user_ns)))
- r = -EFAULT;
-
- r = -EINVAL;
- if (user_ns.flags)
goto out;
-
+ r = 0;
break;
}