[linux] 03/05: fuse: Propagate dentry down to inode_change_ok()

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Wed Nov 16 18:27:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

carnil pushed a commit to branch sid
in repository linux.

commit 2e74b80287d3a46052de09b40faff6015c24e0f9
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Sun Nov 13 11:36:14 2016 +0100

    fuse: Propagate dentry down to inode_change_ok()
---
 debian/changelog                                   |  1 +
 ...-Propagate-dentry-down-to-inode_change_ok.patch | 64 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 66 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8ed7565..1a05b51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,6 +45,7 @@ linux (4.8.8-1) UNRELEASED; urgency=medium
   * Bump ABI to 2 and remove ABI reference for 4.8.0-1
   * xfs: Propagate dentry down to inode_change_ok()
   * ceph: Propagate dentry down to inode_change_ok()
+  * fuse: Propagate dentry down to inode_change_ok()
 
  -- Salvatore Bonaccorso <carnil at debian.org>  Tue, 15 Nov 2016 22:01:08 +0100
 
diff --git a/debian/patches/bugfix/all/fuse-Propagate-dentry-down-to-inode_change_ok.patch b/debian/patches/bugfix/all/fuse-Propagate-dentry-down-to-inode_change_ok.patch
new file mode 100644
index 0000000..ffff87d
--- /dev/null
+++ b/debian/patches/bugfix/all/fuse-Propagate-dentry-down-to-inode_change_ok.patch
@@ -0,0 +1,64 @@
+From: Jan Kara <jack at suse.cz>
+Date: Thu, 26 May 2016 17:12:41 +0200
+Subject: fuse: Propagate dentry down to inode_change_ok()
+Origin: https://git.kernel.org/linus/62490330769c1ce5dcba3f1f3e8f4005e9b797e6
+
+To avoid clearing of capabilities or security related extended
+attributes too early, inode_change_ok() will need to take dentry instead
+of inode. Propagate it down to fuse_do_setattr().
+
+Acked-by: Miklos Szeredi <mszeredi at redhat.com>
+Reviewed-by: Christoph Hellwig <hch at lst.de>
+Signed-off-by: Jan Kara <jack at suse.cz>
+[carnil: backport for 4.8]
+---
+ fs/fuse/dir.c    | 7 ++++---
+ fs/fuse/file.c   | 2 +-
+ fs/fuse/fuse_i.h | 2 +-
+ 3 files changed, 6 insertions(+), 5 deletions(-)
+
+--- a/fs/fuse/dir.c
++++ b/fs/fuse/dir.c
+@@ -1591,9 +1591,10 @@ int fuse_flush_times(struct inode *inode
+  * vmtruncate() doesn't allow for this case, so do the rlimit checking
+  * and the actual truncation by hand.
+  */
+-int fuse_do_setattr(struct inode *inode, struct iattr *attr,
++int fuse_do_setattr(struct dentry *dentry, struct iattr *attr,
+ 		    struct file *file)
+ {
++	struct inode *inode = d_inode(dentry);
+ 	struct fuse_conn *fc = get_fuse_conn(inode);
+ 	struct fuse_inode *fi = get_fuse_inode(inode);
+ 	FUSE_ARGS(args);
+@@ -1735,7 +1736,7 @@ static int fuse_setattr(struct dentry *e
+ 	if (!attr->ia_valid)
+ 		return 0;
+ 
+-	ret = fuse_do_setattr(inode, attr, file);
++	ret = fuse_do_setattr(entry, attr, file);
+ 	if (!ret) {
+ 		/* Directory mode changed, may need to revalidate access */
+ 		if (d_is_dir(entry) && (attr->ia_valid & ATTR_MODE))
+--- a/fs/fuse/file.c
++++ b/fs/fuse/file.c
+@@ -2842,7 +2842,7 @@ static void fuse_do_truncate(struct file
+ 	attr.ia_file = file;
+ 	attr.ia_valid |= ATTR_FILE;
+ 
+-	fuse_do_setattr(inode, &attr, file);
++	fuse_do_setattr(file_dentry(file), &attr, file);
+ }
+ 
+ static inline loff_t fuse_round_up(loff_t off)
+--- a/fs/fuse/fuse_i.h
++++ b/fs/fuse/fuse_i.h
+@@ -958,7 +958,7 @@ bool fuse_write_update_size(struct inode
+ int fuse_flush_times(struct inode *inode, struct fuse_file *ff);
+ int fuse_write_inode(struct inode *inode, struct writeback_control *wbc);
+ 
+-int fuse_do_setattr(struct inode *inode, struct iattr *attr,
++int fuse_do_setattr(struct dentry *dentry, struct iattr *attr,
+ 		    struct file *file);
+ 
+ void fuse_set_initialized(struct fuse_conn *fc);
diff --git a/debian/patches/series b/debian/patches/series
index 407b349..84cdb14 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -95,6 +95,7 @@ bugfix/all/ptrace-being-capable-wrt-a-process-requires-mapped-uids-gids.patch
 debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
 bugfix/all/xfs-Propagate-dentry-down-to-inode_change_ok.patch
 bugfix/all/ceph-Propagate-dentry-down-to-inode_change_ok.patch
+bugfix/all/fuse-Propagate-dentry-down-to-inode_change_ok.patch
 
 # ABI maintenance
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list