Re: genirq: Ensure we locate the passed IRQ in irq_alloc_descs()

Thomas Gleixner
2011-06-03T16:25:05Z

On Fri, 3 Jun 2011, Milton Miller wrote:

> On Fri, 3 Jun 2011 about 11:42:17 +0100, Mark Brown wrote:
> > On Fri, Jun 03, 2011 at 04:24:02AM -0500, Milton Miller wrote:
> > > On Thu, 02 Jun 2011 17:55:13 -0000, Mark Brown wrote:
> >
> > > > start = bitmap_find_next_zero_area(allocated_irqs, IRQ_BITMAP_BITS,
> >
> > > and then right after this the code continues:
> >
> > > ret = -EEXIST;
> > > if (irq >=0 && start != irq)
> > > goto err;
> >
> > > This patch enables exactly the calls I want to forbid ! Why do
> >
> > Which you wish to forbid because...? You've not articulated any
> > motivation for doing this which makes it rather hard to engage here.
>
> In 2.6.39 all calls to irq_alloc_descs were from the helpers. Either
> from irq_alloc_descriptor_at , which says "I need this exact irq",
> or from irq_alloc_desc, which says "give me any irq".

That does not prevent a caller with uses irq_alloc_descs() directly
with the wrong arguments. So we want to sanity check this.

Thanks,

tglx