[PATCH] watchdog: s3c2410: Fix potential deadlock on &wdt->lock
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Tue Jul 4 00:53:26 PDT 2023
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
More information about the linux-arm-kernel
mailing list