Re: [PATCH 1/2] drivers: create a pin control subsystem v7

From: Linus Walleij
Date: Wed Sep 28 2011 - 05:19:06 EST


On Tue, Sep 27, 2011 at 11:30 AM, Stijn Devriendt <highguy@xxxxxxxxx> wrote:
>> +       spin_unlock(&desc->lock);
>
> Now this is racing with...
> (...)
> ... this:
>
>> +       spin_lock(&desc->lock);
>> +       desc->mux_requested = true;
>> +       strncpy(desc->mux_function, function, sizeof(desc->mux_function));
>> +       spin_unlock(&desc->lock);

Good catch!

I've fixed it by setting ->mux_requested immediatelty and then
later release it (inside a lock) if something fails.

Yours,
Linus Walleij
--
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/