[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175071769977.1313689.17031304195809982055.b4-ty@bootlin.com>
Date: Tue, 24 Jun 2025 00:29:26 +0200
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Mateusz Jończyk <mat.jonczyk@...pl>
Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
linux-rtc@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Chris Bainbridge <chris.bainbridge@...il.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Xiaofei Tan <tanxiaofei@...wei.com>, stable@...r.kernel.org
Subject: Re: [PATCH] rtc-cmos: use spin_lock_irqsave in cmos_interrupt
On Sat, 07 Jun 2025 23:06:08 +0200, Mateusz Jończyk wrote:
> cmos_interrupt() can be called in a non-interrupt context, such as in
> an ACPI event handler (which runs in an interrupt thread). Therefore,
> usage of spin_lock(&rtc_lock) is insecure. Use spin_lock_irqsave() /
> spin_unlock_irqrestore() instead.
>
> Before a misguided
> commit 6950d046eb6e ("rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ")
> the cmos_interrupt() function used spin_lock_irqsave(). That commit
> changed it to spin_lock() and broke locking, which was partially fixed in
> commit 13be2efc390a ("rtc: cmos: Disable irq around direct invocation of cmos_interrupt()")
>
> [...]
Applied, thanks!
[1/1] rtc-cmos: use spin_lock_irqsave in cmos_interrupt
https://git.kernel.org/abelloni/c/00a39d8652ff
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists