Re: [PATCH 2 of 4] [x86-64] Calgary: only verify the allocation bitmap if CONFIG_IOMMU_DEBUG is on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 02, 2006 at 10:57:24PM -0500, Jon Mason wrote:

> > diff -r 9cd758467ce1 -r 515131a26b15 arch/x86_64/kernel/pci-calgary.c
> > --- a/arch/x86_64/kernel/pci-calgary.c	Thu Aug 03 01:37:12 2006 +0300
> > +++ b/arch/x86_64/kernel/pci-calgary.c	Thu Aug 03 01:40:21 2006 +0300
> > @@ -133,12 +133,35 @@ static inline void tce_cache_blast_stres
> >  {
> >  	tce_cache_blast(tbl);
> >  }
> > +
> > +static inline unsigned long verify_bit_range(unsigned long* bitmap,
> > +	int expected, unsigned long start, unsigned long end)
> > +{
> > +	unsigned long idx = start;
> > +
> > +	BUG_ON(start > end);
> 
> This should be ">=".

I considered both options and decided that since this is debug code,
we might as well be permissive and not trip when start == end (because
I'm not 100% sure we never do it). However since it could arguably be
masking a real bug if we do, I agree with the change.

Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux