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
  • kernel
  • notifier.c
Find file BlameHistoryPermalink
  • Borislav Petkov's avatar
    notifier: Return an error when a callback has already been registered · 5abb065d
    Borislav Petkov authored Dec 01, 2021
    Return -EEXIST when a notifier callback has already been registered on a
    notifier chain.
    
    This should avoid any homegrown registration tracking at the callsite
    like
    
      https://lore.kernel.org/amd-gfx/20210512013058.6827-1-mukul.joshi@amd.com
    
    for example.
    
    This version is an alternative of
    
      https://lore.kernel.org/r/20211108101157.15189-1-bp@alien8.de
    
    
    
    which needed to touch every caller not checking the registration
    routine's return value.
    
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Reviewed-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Link: https://lore.kernel.org/r/YcSWNdUBS8A2ZB3s@zn.tnic
    5abb065d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7