Re: [PATCH] POWER: gpio-charger: Fix potential race between irqhandler and probe/remove function

From: Anton Vorontsov
Date: Tue Dec 21 2010 - 19:05:16 EST


On Thu, Nov 18, 2010 at 11:08:38PM +0100, Lars-Peter Clausen wrote:
> This patch fixes a potential race between the irq handler and the probe and
> remove functions.
> The irq should not be requested before the chargers power_supply has been
> registered and has to be freed before the power_supply is unregistered,
> otherwise it is possible that the irq fires while the power_supply is not
> initialized yet or has already been freed.
>
> While we are at it replace request_irq with request_any_context_irq.
>
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>

Applied to battery-2.6.git, thanks!

--
Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
--
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/