Re: [PATCH] spi: Unlock a spinlock before calling into the controller driver.

From: Linus Walleij
Date: Mon Jun 25 2012 - 15:01:54 EST


On Sat, Jun 23, 2012 at 7:53 AM, Bryan Freed <bfreed@xxxxxxxxxxxx> wrote:

> spi_pump_messages() calls into a controller driver with
> unprepare_transfer_hardware() which is documented as "This may sleep".
> As in the prepare_transfer_hardware() call below, we should release the
> queue_lock spinlock before making the call.
> Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
> then release it to call unprepare_transfer_hardware().
>
> Signed-off-by: Bryan Freed <bfreed@xxxxxxxxxxxx>

Yes, this looks correct to me! Good catch.
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

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/