Skip to contentSkip to conversation

Patch "ovl: copy new uid/gid into overlayfs runtime inode" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 13, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ovl: copy new uid/gid into overlayfs runtime inode

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ovl-copy-new-uid-gid-into-overlayfs-runtime-inode.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b81de061fa59f17d2730aabb1b84419ef3913810 Mon Sep 17 00:00:00 2001

From: Konstantin Khlebnikov <[email protected]>
Date: Sun, 31 Jan 2016 16:21:29 +0300
Subject: ovl: copy new uid/gid into overlayfs runtime inode

From: Konstantin Khlebnikov <[email protected]>

commit b81de061fa59f17d2730aabb1b84419ef3913810 upstream.

Overlayfs must update uid/gid after chown, otherwise functions like inode_owner_or_capable() will check user against stale uid. Catched by xfstests generic/087, it chowns file and calls utimes.

---
 fs/overlayfs/inode.c |    2 ++
 1 file changed, 2 insertions(+)
fs/overlayfs/inode.c +2 -0
@@ -65,6 +65,8 @@ int ovl_setattr(struct dentry *dentry, s
 
 		mutex_lock(&upperdentry->d_inode->i_mutex);
 		err = notify_change(upperdentry, attr, NULL);
+		if (!err)
+			ovl_copyattr(upperdentry->d_inode, dentry->d_inode);
 		mutex_unlock(&upperdentry->d_inode->i_mutex);
 	}
 	ovl_drop_write(dentry);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/ovl-ignore-lower-entries-when-checking-purity-of-non-directory-entries.patch queue-4.4/ovl-copy-new-uid-gid-into-overlayfs-runtime-inode.patch queue-4.4/ovl-fix-working-on-distributed-fs-as-lower-layer.patch queue-4.4/ovl-fix-getcwd-failure-after-unsuccessful-rmdir.patch