[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.1-testing] x86/oprof: adjust off-by-one counter range checks
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxx> # Date 1351497753 -3600 # Node ID 2cdf9b7338018f3d4ce8125d01564ff5587c7241 # Parent a18ca08c475e020da935c2024cebc2d8b97074cb x86/oprof: adjust off-by-one counter range checks Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> xen-unstable changeset: 26061:4b4c0c7a6031 xen-unstable date: Wed Oct 17 09:23:10 UTC 2012 --- diff -r a18ca08c475e -r 2cdf9b733801 xen/arch/x86/oprofile/xenoprof.c --- a/xen/arch/x86/oprofile/xenoprof.c Mon Oct 29 09:01:52 2012 +0100 +++ b/xen/arch/x86/oprofile/xenoprof.c Mon Oct 29 09:02:33 2012 +0100 @@ -25,7 +25,7 @@ int xenoprof_arch_counter(XEN_GUEST_HAND if ( copy_from_guest(&counter, arg, 1) ) return -EFAULT; - if ( counter.ind > OP_MAX_COUNTER ) + if ( counter.ind >= OP_MAX_COUNTER ) return -E2BIG; counter_config[counter.ind].count = counter.count; @@ -63,7 +63,7 @@ int compat_oprof_arch_counter(XEN_GUEST_ if ( copy_from_guest(&counter, arg, 1) ) return -EFAULT; - if ( counter.ind > OP_MAX_COUNTER ) + if ( counter.ind >= OP_MAX_COUNTER ) return -E2BIG; counter_config[counter.ind].count = counter.count; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |