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
You need to sign in or sign up before continuing.
  • linux
  • drivers
  • regulator
  • core.c
Find file BlameHistoryPermalink
  • Arnd Bergmann's avatar
    regulator: core: fix regulator_lock_supply regression · f500da32
    Arnd Bergmann authored Nov 27, 2015
    commit bb41897e
    
     upstream.
    
    As noticed by Geert Uytterhoeven, my patch to avoid a harmless build warning
    in regulator_lock_supply() was total crap and introduced a real bug:
    
    > [ BUG: bad unlock balance detected! ]
    > kworker/u4:0/6 is trying to release lock (&rdev->mutex) at:
    > [<c0247b84>] regulator_set_voltage+0x38/0x50
    
    we still lock the regulator supplies, but not the actual regulators,
    so we are missing a lock, and the unlock is unbalanced.
    
    This rectifies it by first locking the regulator device itself before
    using the same loop as before to lock its supplies.
    
    Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Fixes: 716fec9d1965 ("[SUBMITTED] regulator: core: avoid unused variable warning")
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f500da32
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7