linux-next: manual merge of the security tree with the vfs tree

From: Stephen Rothwell
Date: Mon Aug 12 2019 - 00:44:25 EST


Hi all,

Today's linux-next merge of the security tree got a conflict in:

fs/tracefs/inode.c

between commit:

67782f8ae148 ("vfs: Convert tracefs to use the new mount API")

from the vfs tree and commit:

757ff7244358 ("tracefs: Restrict tracefs when the kernel is locked down")

from the security tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc fs/tracefs/inode.c
index 1387bcd96a79,34da48036e08..000000000000
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@@ -19,8 -17,10 +19,9 @@@
#include <linux/tracefs.h>
#include <linux/fsnotify.h>
#include <linux/seq_file.h>
-#include <linux/parser.h>
#include <linux/magic.h>
#include <linux/slab.h>
+ #include <linux/security.h>

#define TRACEFS_DEFAULT_MODE 0700

@@@ -210,12 -239,26 +228,18 @@@ static int tracefs_apply_options(struc
return 0;
}

+ static void tracefs_destroy_inode(struct inode *inode)
+ {
+ if (S_ISREG(inode->i_mode))
+ kfree(inode->i_fop);
+ }
+
-static int tracefs_remount(struct super_block *sb, int *flags, char *data)
+static int tracefs_reconfigure(struct fs_context *fc)
{
- int err;
- struct tracefs_fs_info *fsi = sb->s_fs_info;
+ struct super_block *sb = fc->root->d_sb;

sync_filesystem(sb);
- err = tracefs_parse_options(data, &fsi->mount_opts);
- if (err)
- goto fail;
-
- tracefs_apply_options(sb);
-
-fail:
- return err;
+ return tracefs_apply_options(sb);
}

static int tracefs_show_options(struct seq_file *m, struct dentry *root)
@@@ -236,6 -280,8 +260,7 @@@

static const struct super_operations tracefs_super_operations = {
.statfs = simple_statfs,
- .remount_fs = tracefs_remount,
+ .destroy_inode = tracefs_destroy_inode,
.show_options = tracefs_show_options,
};

Attachment: pgpkntSduYDrP.pgp
Description: OpenPGP digital signature