>>> On 13.08.15 at 03:37, <feng...@intel.com> wrote: >> From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] >> Sent: Thursday, August 13, 2015 12:43 AM >> On Wed, Aug 12, 2015 at 10:35:33AM +0800, Feng Wu wrote: >> > + } >> > + >> > + if ( dest_vcpu_num != 0 ) >> > + { >> > + idx = 0; >> > + >> > + for ( i = gvec % dest_vcpu_num; i >= 0; i--) >> >> That loop is not good as it will overflow. >> >> Imagine gvec = 40, dest_vcpu_num = 2 >> On first iteration i = 0, on the next i = -1 (aka 0xfffffff), and so on. >> > > So we should define 'i' as int, right?
No, you should fix the loop. 'i' can't validly hold negative values. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel