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
  • scripts
  • checkpatch.pl
Find file BlameHistoryPermalink
  • David Hildenbrand's avatar
    checkpatch: warn on usage of VM_BUG_ON() and other BUG variants · 69d517e6
    David Hildenbrand authored Sep 23, 2022
    checkpatch does not point out that VM_BUG_ON() and friends should be
    avoided, however, Linus notes:
    
        VM_BUG_ON() has the exact same semantics as BUG_ON. It is literally
        no different, the only difference is "we can make the code smaller
        because these are less important". [1]
    
    So let's warn on VM_BUG_ON() and other BUG variants as well. While at it,
    make it clearer that the kernel really shouldn't be crashed.
    
    As there are some subsystem BUG macros that actually don't end up crashing
    the kernel -- for example, KVM_BUG_ON() -- exclude these manually.
    
    [1] https://lore.kernel.org/r/CAHk-=wg40EAZofO16Eviaj7mfqDhZ2gVEbvfsMf6gYzspRjYvw@mail.gmail.com
    
    
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Link: https://lore.kernel.org/r/20220923113426.52871-3-david@redhat.com
    
    
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
    69d517e6
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7