Messages in this thread | | | Date | Wed, 28 Sep 2011 11:18:59 +0200 | Subject | Re: [PATCH 1/2] drivers: create a pin control subsystem v7 | From | Linus Walleij <> |
| |
On Tue, Sep 27, 2011 at 11:30 AM, Stijn Devriendt <highguy@gmail.com> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |