This is a note to let you know that I've just added the patch titled rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: rtc-cmos-replace-spin_lock_irqsave-with-spin_lock-in.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit ad5b5459965ce741f5ad888fa23e74271b21b8c9 Author: Xiaofei Tan <tanxiaofei@xxxxxxxxxx> Date: Wed Feb 3 20:39:36 2021 +0800 rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ [ Upstream commit 6950d046eb6eabbc271fda416460c05f7a85698a ] It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <tanxiaofei@xxxxxxxxxx> Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx> Link: https://lore.kernel.org/r/1612355981-6764-2-git-send-email-tanxiaofei@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index d419eb988b22..21f2bdd025b6 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -704,11 +704,10 @@ static struct cmos_rtc cmos_rtc; static irqreturn_t cmos_interrupt(int irq, void *p) { - unsigned long flags; u8 irqstat; u8 rtc_control; - spin_lock_irqsave(&rtc_lock, flags); + spin_lock(&rtc_lock); /* When the HPET interrupt handler calls us, the interrupt * status is passed as arg1 instead of the irq number. But @@ -742,7 +741,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p) hpet_mask_rtc_irq_bit(RTC_AIE); CMOS_READ(RTC_INTR_FLAGS); } - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock(&rtc_lock); if (is_intr(irqstat)) { rtc_update_irq(p, 1, irqstat);