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
  • workqueue.c
Find file BlameHistoryPermalink
  • Tetsuo Handa's avatar
    workqueue: Try to catch flush_work() without INIT_WORK(). · 4d43d395
    Tetsuo Handa authored Jan 23, 2019
    syzbot found a flush_work() caller who forgot to call INIT_WORK()
    because that work_struct was allocated by kzalloc() [1]. But the message
    
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
    
    by lock_map_acquire() is failing to tell that INIT_WORK() is missing.
    
    Since flush_work() without INIT_WORK() is a bug, and INIT_WORK() should
    set ->func field to non-zero, let's warn if ->func field is zero.
    
    [1] https://syzkaller.appspot.com/bug?id=a5954455fcfa51c29ca2ab55b203076337e1c770
    
    
    
    Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    4d43d395
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7