Re: [PATCH] Avoid indefinite wait in smp_call_function_many() ifcpumask is modified

From: Russell King - ARM Linux
Date: Tue Mar 15 2011 - 14:46:47 EST


On Tue, Mar 15, 2011 at 06:20:56PM +0000, Catalin Marinas wrote:
> On ARM processors (and not only) with software broadcasting of the TLB
> maintenance operations, smp_call_function_many() is given a
> mm_cpumask(mm) as argument. This cpumask may be modified (bits cleared)
> during the smp_call_function_many() execution as a result of other
> events like ASID roll-over.

We shouldn't be modifying a mask which has been passed into one of these
functions. Having masks change beneath a function which is actively
using it and can wait is an obvious recipe for problems and races.
--
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/