Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

vfs: fix deadlock in file_remove_privs() on overlayfs #20

Merged
merged 1 commit into from
Aug 3, 2016
Merged

vfs: fix deadlock in file_remove_privs() on overlayfs #20

merged 1 commit into from
Aug 3, 2016

Commits on Aug 3, 2016

  1. vfs: fix deadlock in file_remove_privs() on overlayfs

    file_remove_privs() is called with inode lock on file_inode(), which
    proceeds to calling notify_change() on file->f_path.dentry.  Which triggers
    the WARN_ON_ONCE(!inode_is_locked(inode)) in addition to deadlocking later
    when ovl_setattr tries to lock the underlying inode again.
    
    Fix this mess by not mixing the layers, but doing everything on underlying
    dentry/inode.
    
    Signed-off-by: Miklos Szeredi <[email protected]>
    Fixes: 07a2daa ("ovl: Copy up underlying inode's ->i_mode to overlay inode")
    Cc: <[email protected]>
    Miklos Szeredi authored and Vito Caputo committed Aug 3, 2016
    Configuration menu
    Copy the full SHA
    bfae341 View commit details
    Browse the repository at this point in the history