On Sat, Oct 17, 2009 at 05:56:48PM +0100, Jonathan Cameron wrote:
> +static int tsl2550_get_id(void)
> +{
> +     int ret, val;
> +
> +idr_again:
> +     if (unlikely(idr_pre_get(&tsl2550_idr, GFP_KERNEL) == 0))
> +             return -ENOMEM;
> +     spin_lock(&tsl2550_idr_lock);
> +     ret = idr_get_new(&tsl2550_idr, NULL, &val);
> +     if (unlikely(ret == -EAGAIN))
> +             goto idr_again;



That looks like a fair chance to produce a deadlock
by reacquiring the above spinlock.

Also I never see the above lock released later from this
function or its caller.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to