From: Yu Liao <liaoyu15@huawei.com>
To: <alexandre.belloni@bootlin.com>, <a.zummo@towertech.it>
Cc: <liaoyu15@huawei.com>, <liwei391@huawei.com>,
<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>
Subject: [RFC PATCH 0/2] rtc: fix race condition between uie enable and rtc set time
Date: Wed, 26 Oct 2022 11:33:46 +0800 [thread overview]
Message-ID: <20221026033348.1660732-1-liaoyu15@huawei.com> (raw)
The patch series fixes two issues in rtc_set_time caused by race
conditions:
- rtc_timer_do_work will loop for a while when setting rtc time in the
future with uie enabled.
- RTC_UIE_OFF does not work when RTC_UIE_OFF and RTC_SET_TIME are
running in parallel.
Patch #1 extracts lockless version from rtc_update_irq_enable, and
patch #2 addresses the race condition issue.
Yu Liao (2):
rtc: add lockless rtc_update_irq_enable
rtc: fix race condition in rtc_set_time()
drivers/rtc/interface.c | 43 ++++++++++++++++++++++++-----------------
1 file changed, 25 insertions(+), 18 deletions(-)
--
2.25.1
next reply other threads:[~2022-10-26 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 3:33 Yu Liao [this message]
2022-10-26 3:33 ` [RFC PATCH 1/2] rtc: add lockless rtc_update_irq_enable Yu Liao
2022-10-26 3:33 ` [RFC PATCH 2/2] rtc: fix race condition in rtc_set_time() Yu Liao
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=20221026033348.1660732-1-liaoyu15@huawei.com \
--to=liaoyu15@huawei.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=liwei391@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).