Re: [PATCH] stack and rcu interaction bug in smp_call_function_mask()

From: Andi Kleen
Date: Fri Aug 08 2008 - 20:14:33 EST


Venki Pallipadi <venkatesh.pallipadi@xxxxxxxxx> writes:
>
> One way to solve the problem is to have CPU A wait as long as there is a rcu
> read happening. But, we cannot use synchronize_rcu() here as we cannot block.
> Another way around is to always allocate call_function_data, instead
> of using CPU A's stack. Below patch does this. But, that will still have to
> handle the kmalloc failure case somehow.
>
> Any other ideas on how to solve this problem?

Perhaps it needs a custom RCU cycle? That is possible to define
with some effort.

I would feel uneasy about always allocating. GFP_ATOMIC can fail and I
expect most callers are not prepared to do handle that and in many
cases there is not even a good way. Now that there are patches
floating around even using this for the tlb flush that would be
deadly.

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