[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231206122738.cnnjxszz4g6zak3w@zenone.zhora.eu>
Date: Wed, 6 Dec 2023 13:27:38 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Jensen Huang <jensenhuang@...endlyarm.com>
Cc: Heiko Stuebner <heiko@...ech.de>,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: rk3x: fix potential spinlock recursion on poll
Hi Jensen,
On Wed, Dec 06, 2023 at 05:06:40PM +0800, Jensen Huang wrote:
> Possible deadlock scenario (on reboot):
> rk3x_i2c_xfer_common(polling)
> -> rk3x_i2c_wait_xfer_poll()
> -> rk3x_i2c_irq(0, i2c);
> --> spin_lock(&i2c->lock);
> ...
> <rk3x i2c interrupt>
> -> rk3x_i2c_irq(0, i2c);
> --> spin_lock(&i2c->lock); (deadlock here)
>
> Store the IRQ number and disable/enable it around the polling transfer.
> This patch has been tested on NanoPC-T4.
>
> Signed-off-by: Jensen Huang <jensenhuang@...endlyarm.com>
Looks good,
Reviewed-by: Andi Shyti <andi.shyti@...nel.org>
Thanks,
Andi
Powered by blists - more mailing lists