Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • drivers
  • rtc
  • interface.c
Find file BlameHistoryPermalink
  • Ales Novak's avatar
    drivers/rtc/interface.c: fix infinite loop in initializing the alarm · ee1d9014
    Ales Novak authored Jun 06, 2014
    
    
    In __rtc_read_alarm(), if the alarm time retrieved by
    rtc_read_alarm_internal() from the device contains invalid values (e.g.
    month=2,mday=31) and the year not set (=-1), the initialization will
    loop infinitely because the year-fixing loop expects the time being
    invalid due to leap year.
    
    Fix reduces the loop to the leap years and adds final validity check.
    
    Signed-off-by: default avatarAles Novak <alnovak@suse.cz>
    Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
    Reported-by: default avatarJiri Bohac <jbohac@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ee1d9014
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7