Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
I
ipipe-x86
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Commits
  • xenomai
  • ipipe-x86
  • Repository

Switch branch/tag
  • ipipe-x86
  • fs
  • fs-writeback.c
Find file BlameHistoryPermalink
  • Jiufei Xue's avatar
    fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount · f658822c
    Jiufei Xue authored May 17, 2019
    commit ec084de9 upstream.
    
    synchronize_rcu() didn't wait for call_rcu() callbacks, so inode wb
    switch may not go to the workqueue after synchronize_rcu().  Thus
    previous scheduled switches was not finished even flushing the
    workqueue, which will cause a NULL pointer dereferenced followed below.
    
      VFS: Busy inodes after unmount of vdd. Self-destruct in 5 seconds.  Have a nice day...
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000278
        evict+0xb3/0x180
        iput+0x1b0/0x230
        inode_switch_wbs_work_fn+0x3c0/0x6a0
        worker_thread+0x4e/0x490
        ? process_one_work+0x410/0x410
        kthread+0xe6/0x100
        ret_from_fork+0x39/0x50
    
    Replace the synchronize_rcu() call with a rcu_barrier() to wait for all
    pending callbacks to finish.  And inc isw_nr_in_flight after call_rcu()
    in inode_switch_wbs() to make more sense.
    
    Link: http://lkml.kernel.org/r/20190429024108.54150-1-jiufei.xue@linux.alibaba.comSigned-off-by: default avatarJiufei Xue <jiufei.xue@linux.alibaba.com>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Suggested-by: default avatarTejun Heo <tj@kernel.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f658822c
fs-writeback.c 71.8 KB
EditWeb IDE

Replace fs-writeback.c

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.