diff options
author | Tim Deegan <tim@xen.org> | 2013-09-23 16:23:14 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-09-23 16:23:14 +0200 |
commit | 9e5a66bc88a0cf0ff0f3339381a2332f305d1a9c (patch) | |
tree | 0c3438951f65ab5a06ccaf4a8194b1ec77c9d4a9 | |
parent | b55b8a9f9b8d11cbc8756243c6ded01f5e618603 (diff) | |
download | xen-9e5a66bc88a0cf0ff0f3339381a2332f305d1a9c.tar.gz xen-9e5a66bc88a0cf0ff0f3339381a2332f305d1a9c.tar.bz2 xen-9e5a66bc88a0cf0ff0f3339381a2332f305d1a9c.zip |
cpufreq: missing check of copy_from_guest()
Coverity CID 1055131
Coverity CID 1055132
Signed-off-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: 803f9a6cdfeda64beee908576de0ad02d6b0c480
master date: 2013-09-12 17:47:08 +0100
-rw-r--r-- | xen/drivers/cpufreq/cpufreq.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index 0de5d41d44..ab66884797 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -471,8 +471,12 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *dom0_px_in ret = -ENOMEM; goto out; } - copy_from_guest(pxpt->states, dom0_px_info->states, - dom0_px_info->state_count); + if ( copy_from_guest(pxpt->states, dom0_px_info->states, + dom0_px_info->state_count) ) + { + ret = -EFAULT; + goto out; + } pxpt->state_count = dom0_px_info->state_count; if ( cpufreq_verbose ) |