drivers/rtc: fix rcu unexpected reboot#592
Open
yanmarkman wants to merge 1 commit into
Open
Conversation
Why needed (PROBLEM): Under 'chrony' configuration or/and further hwrtc change the RCU on the rtc_timer_do_work() reported and reproduced. Easy reproduced on armhf Nokia-AC3X. Not reproduced on SONiC TRIXIE. How fixed: drivers/rtc/interface.c: rtc_timer_do_work() When processing expired RTC events and rearming them, use "now" instead of "expiry" to prevent endless loops. Signed-off-by: Elad Nachman <enachman@marvell.com> Signed-off-by: Yan Markman <ymarkman@marvell.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
paulmenzel
suggested changes
Jun 22, 2026
paulmenzel
left a comment
Contributor
There was a problem hiding this comment.
Please also send this upstream for review.
|
|
||
| When processing expired RTC events and rearming them, use now | ||
| instead of expiry to prevent endless loops. | ||
|
|
Contributor
There was a problem hiding this comment.
Please add a Fixes: tag, and also list the devices in the commit message.
|
|
||
| + if (rtc && rtc->ops && rtc->ops->read_time) { | ||
| + if (!rtc->ops->read_time(rtc->dev.parent, &new_tm)) { | ||
| + pr_err("new rtc tm %d %d %d %d %d %d %d %d %d\n", |
Contributor
There was a problem hiding this comment.
Please re-write. Currently it’s more like a debug message. (Which is good to have.)
| /* Re-add/fwd periodic timers */ | ||
| if (ktime_to_ns(timer->period)) { | ||
| - timer->node.expires = ktime_add(timer->node.expires, | ||
| + timer->node.expires = ktime_add(now/*timer->node.expires*/, |
Contributor
There was a problem hiding this comment.
We have git, so commenting this out is not useful.
Contributor
Author
yanmarkman
added a commit
to Marvell-switching/sonic-scripts
that referenced
this pull request
Jun 23, 2026
sonic-net/sonic-linux-kernel#592 Signed-off-by: Yan Markman <ymarkman@marvell.com>
Contributor
Author
|
HI @paulmenzel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why needed (PROBLEM):
Under 'chrony' configuration or/and further hwrtc change the RCU on the rtc_timer_do_work() reported and reproduced.
How fixed:
drivers/rtc/interface.c: rtc_timer_do_work()
When processing expired RTC events and rearming them, use "now"
instead of "expiry" to prevent endless loops.