Re: [PATCH 7/8] i2c: nomadik: fix race condition with interrupt handler

From: Linus Walleij

Date: Thu Nov 05 2026 - 03:45:42 EST


On Tue, Nov 3, 2026 at 9:30 AM Dmitry Guzman <Dmitry.Guzman@xxxxxxxxxxxx> wrote:

> If nmk_i2c_wait_xfer_done() gets timeout on waiting for wakeup from
> interrupt handler, there is no synchronization with interrupt handler
> that may run in parallel. This can potentially lead to various race
> conditions between thread and interrupt handler.
>
> Disable and clear all pending interrupt requests and wait until running
> interrupt handler finishes after the timeout.
>
> Signed-off-by: Dmitry Guzman <Dmitry.Guzman@xxxxxxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij