• Miklos Szeredi's avatar
    ovl: fix warning in ovl_create_real() · 1f5573cf
    Miklos Szeredi authored
    Syzbot triggered the following warning in ovl_workdir_create() ->
    ovl_create_real():
    
    	if (!err && WARN_ON(!newdentry->d_inode)) {
    
    The reason is that the cgroup2 filesystem returns from mkdir without
    instantiating the new dentry.
    
    Weird filesystems such as this will be rejected by overlayfs at a later
    stage during setup, but to prevent such a warning, call ovl_mkdir_real()
    directly from ovl_workdir_create() and reject this case early.
    
    Reported-and-tested-by: syzbot+75eab84fd0af9e8bf66b@syzkaller.appspotmail.com
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    1f5573cf
super.c 54.1 KB