From: Gregory Price <gourry@gourry.net>
To: sashiko-reviews@lists.linux.dev
Cc: linux-rtc@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: Re: [RESEND PATCH 1/2] rtc: cmos: Disable ACPI RTC event before handling it
Date: Thu, 15 Oct 2026 17:53:03 -0400 [thread overview]
Message-ID: <atFKh05sL0FpV8Q4@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <sashiko-outbox-173261@kernel.org>
On Thu, Oct 15, 2026 at 05:42:19PM +0000, sashiko-bot@kernel.org wrote:
> > diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> > index fa04ece151b8b..fe514b1aa3433 100644
> > --- a/drivers/rtc/rtc-cmos.c
> > +++ b/drivers/rtc/rtc-cmos.c
> > @@ -758,7 +758,9 @@ static u32 rtc_handler(void *context)
> > unsigned char rtc_intr;
> > unsigned long flags;
> >
> > -
> > + /* Quiesce this event before rtc->irqwork can arm the next one. */
> > + acpi_clear_event(ACPI_EVENT_RTC);
> > + acpi_disable_event(ACPI_EVENT_RTC, 0);
>
> [Severity: Medium]
> Could this unconditional disablement create a race with concurrent userspace
> threads setting a new alarm?
>
> If a concurrent userspace thread calls ioctl(RTC_ALM_SET), it acquires the
> necessary locks and enables the ACPI event for the newly configured alarm:
>
> drivers/rtc/rtc-cmos.c:rtc_wake_on() {
> acpi_clear_event(ACPI_EVENT_RTC);
> acpi_enable_event(ACPI_EVENT_RTC, 0);
> }
>
> While the patch successfully resolves a similar race with the worker thread
> by moving the disablement before cmos_interrupt(), it seems to leave the
> asynchronous userspace race unhandled.
>
This is a pre-existing issue.
~Gregory
next prev parent reply other threads:[~2026-10-15 21:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 17:30 [RESEND PATCH 0/2] rtc: cmos: Fix ACPI RTC alarm handling Gregory Price
2026-10-15 17:30 ` [RESEND PATCH 1/2] rtc: cmos: Disable ACPI RTC event before handling it Gregory Price
2026-10-15 17:42 ` sashiko-bot
2026-10-15 21:53 ` Gregory Price [this message]
2026-10-15 17:30 ` [RESEND PATCH 2/2] rtc: cmos: Honor explicit use_acpi_alarm parameter value Gregory Price
2026-10-15 17:36 ` sashiko-bot
2026-10-15 21:54 ` Gregory Price
2026-10-19 20:10 ` [RESEND PATCH 0/2] rtc: cmos: Fix ACPI RTC alarm handling Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atFKh05sL0FpV8Q4@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox