Re: [PATCH 04/23] interconnect: imx: fix registration race

From: Luca Ceresoli
Date: Fri Feb 03 2023 - 11:01:40 EST


Hello Johan,

On Wed, 1 Feb 2023 11:15:40 +0100
Johan Hovold <johan+linaro@xxxxxxxxxx> wrote:

> The current interconnect provider registration interface is inherently
> racy as nodes are not added until the after adding the provider. This
> can specifically cause racing DT lookups to fail.
>
> Switch to using the new API where the provider is not registered until
> after it has been fully initialised.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Cc: stable@xxxxxxxxxxxxxxx # 5.8
> Cc: Leonard Crestez <leonard.crestez@xxxxxxx>
> Cc: Alexandre Bailon <abailon@xxxxxxxxxxxx>
> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>

Georgi pointed me to this series after I reported a bug yesterday [0],
that I found on iMX8MP. So I ran some tests with my original, failing
tree, minus one patch with my debugging code to hunt for the bug, plus
patches 1-4 of this series.

The original code was failing approx 5~10% of the times. With your 4
patches applied it ran 139 times with zero errors, which looks great! I
won't be able to do more testing until next Monday to be extra sure.

[0]
https://lore.kernel.org/linux-arm-kernel/20230202175525.3dba79a7@booty/T/#u

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com