Re: [PATCH -tip/cpus4096-v2] cpumask: fix memory leak and cpumask corruption

From: Rusty Russell
Date: Fri Oct 24 2008 - 04:55:32 EST


On Friday 24 October 2008 15:59:59 Hiroshi Shimamoto wrote:
> From: Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>

Hi Hiroshi,

Thanks for looking at this!

> On CONFIG_CPUMASK_OFFSTACK enabled kernel, when exiting
> smp_call_function_many() without calling arch_send_call_function_ipi()
> allbutself should be freed.

That bit's OK, changing the return to "goto out;".

> Also, the memory for allbutself shouldn't be freed when
> arch_send_call_function_ipi() is called. The memory region will be
> referenced in generic_smp_call_function_interrupt(). And the memory
> will be freed at rcu_free_call_data().

As your next patch shows, this should be solved a different way. I'll comment
there.

Cheers,
Rusty.
--
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/