linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] rtc: fix race condition between uie enable and rtc set time
@ 2022-10-26  3:33 Yu Liao
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Yu Liao @ 2022-10-26  3:33 UTC (permalink / raw)
  To: alexandre.belloni, a.zummo; +Cc: liaoyu15, liwei391, linux-kernel, linux-rtc

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-26  3:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  3:33 [RFC PATCH 0/2] rtc: fix race condition between uie enable and rtc set time Yu Liao
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

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).