[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b6d3a872-f32e-bfcd-b603-c08339737045@linaro.org>
Date: Tue, 4 Jul 2023 09:53:26 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Chengfeng Ye <dg573847474@...il.com>, alim.akhtar@...sung.com,
wim@...ux-watchdog.org, linux@...ck-us.net
Cc: linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: s3c2410: Fix potential deadlock on &wdt->lock
On 28/06/2023 18:47, Chengfeng Ye wrote:
> As &wdt->lock is acquired by hard irq s3c2410wdt_irq(),
> other acquisition of the same lock under process context should
> disable irq, otherwise deadlock could happen if the
> irq preempt the execution while the lock is held in process context
> on the same CPU.
>
> [Interrupt]: s3c2410wdt_irq
> -->/root/linux/drivers/watchdog/s3c2410_wdt.c:547
> -->/root/linux/drivers/watchdog/s3c2410_wdt.c:383
> -->spin_lock(&wdt->lock);
This interrupt is a threaded interrupt. Therefore the
s3c2410wdt_keepalive() will be called again from process thread. Are you
sure there is deadlock?
Anyway, please also strip unrelated paths and rather use function names,
not references to lines, because these might be not accurate.
Best regards,
Krzysztof
Powered by blists - more mailing lists