[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] cpufreq: missing check of copy_from_guest()
commit 803f9a6cdfeda64beee908576de0ad02d6b0c480 Author: Tim Deegan <tim@xxxxxxx> AuthorDate: Thu Sep 12 12:36:04 2013 +0100 Commit: Tim Deegan <tim@xxxxxxx> CommitDate: Thu Sep 12 17:47:08 2013 +0100 cpufreq: missing check of copy_from_guest() Coverity CID 1055131 Coverity CID 1055132 Signed-off-by: Tim Deegan <tim@xxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- 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 0de5d41..ab66884 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 ) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |