Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs

Pull overlayfs fixes from Miklos Szeredi:
"Fix two more POSIX ACL bugs introduced in 4.8 and add a missing fsync
during copy up to prevent possible data loss"

* 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
ovl: fsync after copy-up
ovl: fix get_acl() on tmpfs
ovl: update S_ISGID when setting posix ACLs

+17 -3
+2
fs/overlayfs/copy_up.c
··· 178 178 len -= bytes; 179 179 } 180 180 181 + if (!error) 182 + error = vfs_fsync(new_file, 0); 181 183 fput(new_file); 182 184 out_fput: 183 185 fput(old_file);
-3
fs/overlayfs/inode.c
··· 270 270 if (!IS_ENABLED(CONFIG_FS_POSIX_ACL) || !IS_POSIXACL(realinode)) 271 271 return NULL; 272 272 273 - if (!realinode->i_op->get_acl) 274 - return NULL; 275 - 276 273 old_cred = ovl_override_creds(inode->i_sb); 277 274 acl = get_acl(realinode, type); 278 275 revert_creds(old_cred);
+15
fs/overlayfs/super.c
··· 1037 1037 1038 1038 posix_acl_release(acl); 1039 1039 1040 + /* 1041 + * Check if sgid bit needs to be cleared (actual setacl operation will 1042 + * be done with mounter's capabilities and so that won't do it for us). 1043 + */ 1044 + if (unlikely(inode->i_mode & S_ISGID) && 1045 + handler->flags == ACL_TYPE_ACCESS && 1046 + !in_group_p(inode->i_gid) && 1047 + !capable_wrt_inode_uidgid(inode, CAP_FSETID)) { 1048 + struct iattr iattr = { .ia_valid = ATTR_KILL_SGID }; 1049 + 1050 + err = ovl_setattr(dentry, &iattr); 1051 + if (err) 1052 + return err; 1053 + } 1054 + 1040 1055 err = ovl_xattr_set(dentry, handler->name, value, size, flags); 1041 1056 if (!err) 1042 1057 ovl_copyattr(ovl_inode_real(inode, NULL), inode);