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

From: Thomas Gleixner
Date: Fri Jun 03 2011 - 12:25:11 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/