Re: [PATCH 4/4] irq: move move_irq_desc calling to set_affinitydirectly -v4

From: Suresh Siddha
Date: Tue Apr 14 2009 - 18:05:18 EST


Nack.

This patch and the existing code in Linus's git is wrong.

In mainline:

static void ack_apic_edge(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);

irq_complete_move(&desc);
...

And

static void irq_complete_move(struct irq_desc **descp)
{
...
*descp = desc = move_irq_desc(desc, me);
...
}

So, we end up modifying the stack pointer in the stack frame of
ack_apic_edge() but not really achieving the actual irq desc migration.

hmm.. We should be seeing crashes/memory leaks etc when this code is
turned on with the appropriate config options (apart from the code not
achieving its actual intentions).

As far as I can see, this patch also has the same issue.
Please fix both mainline and this patch.

And also, please see below:

On Tue, 2009-04-14 at 13:44 -0700, Yinghai Lu wrote:
> Impact: fix panic
>
> so could move_masked_irq call move_irq_desc directly.
> also we still don't support IRQ_MOVE_PCNTXT aka intr_remapped path

As you added the original bits and also modifying these bits now, it
will be good if you can post a patch for this too. And if you can't test
particular paths, please copy the interested folks and get an ack from
their test results, before pushing the patch to upstream.

thanks,
suresh

--
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/