Commit 3618002d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'vfs-6.15-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Fix NULL pointer dereference in virtiofs

 - Fix slab OOB access in hfs/hfsplus

 - Only create /proc/fs/netfs when CONFIG_PROC_FS is set

 - Fix getname_flags() to initialize pointer correctly

 - Convert dentry flags to enum

 - Don't allow datadir without lowerdir in overlayfs

 - Use namespace_{lock,unlock} helpers in dissolve_on_fput() instead of
   plain namespace_sem so unmounted mounts are properly cleaned up

 - Skip unnecessary ifs_block_is_uptodate check in iomap

 - Remove an unused forward declaration in overlayfs

 - Fix devpts uid/gid handling after converting to the new mount api

 - Fix afs_dynroot_readdir() to not use the RCU read lock

 - Fix mount_setattr() and open_tree_attr() to not pointlessly do path
   lookup or walk the mount tree if no mount option change has been
   requested

* tag 'vfs-6.15-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fs: use namespace_{lock,unlock} in dissolve_on_fput()
  iomap: skip unnecessary ifs_block_is_uptodate check
  fs: Fix filename init after recent refactoring
  netfs: Only create /proc/fs/netfs with CONFIG_PROC_FS
  mount: ensure we don't pointlessly walk the mount tree
  dcache: convert dentry flag macros to enum
  afs: Fix afs_dynroot_readdir() to not use the RCU read lock
  hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key
  virtiofs: add filesystem context source name check
  devpts: Fix type for uid and gid params
  ovl: remove unused forward declaration
  ovl: don't allow datadir only
parents 10e66f29 e2aef868
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -348,9 +348,9 @@ static int afs_dynroot_readdir(struct file *file, struct dir_context *ctx)
	}

	if ((unsigned long long)ctx->pos <= AFS_MAX_DYNROOT_CELL_INO) {
		rcu_read_lock();
		down_read(&net->cells_lock);
		ret = afs_dynroot_readdir_cells(net, ctx);
		rcu_read_unlock();
		up_read(&net->cells_lock);
	}
	return ret;
}
+2 −2
Original line number Diff line number Diff line
@@ -89,12 +89,12 @@ enum {
};

static const struct fs_parameter_spec devpts_param_specs[] = {
	fsparam_u32	("gid",		Opt_gid),
	fsparam_gid	("gid",		Opt_gid),
	fsparam_s32	("max",		Opt_max),
	fsparam_u32oct	("mode",	Opt_mode),
	fsparam_flag	("newinstance",	Opt_newinstance),
	fsparam_u32oct	("ptmxmode",	Opt_ptmxmode),
	fsparam_u32	("uid",		Opt_uid),
	fsparam_uid	("uid",		Opt_uid),
	{}
};

+3 −0
Original line number Diff line number Diff line
@@ -1669,6 +1669,9 @@ static int virtio_fs_get_tree(struct fs_context *fsc)
	unsigned int virtqueue_size;
	int err = -EIO;

	if (!fsc->source)
		return invalf(fsc, "No source specified");

	/* This gets a reference on virtio_fs object. This ptr gets installed
	 * in fc->iq->priv. Once fuse_conn is going away, it calls ->put()
	 * to drop the reference to this object.
+6 −0
Original line number Diff line number Diff line
@@ -67,6 +67,12 @@ void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off)
	else
		key_len = tree->max_key_len + 1;

	if (key_len > sizeof(hfs_btree_key) || key_len < 1) {
		memset(key, 0, sizeof(hfs_btree_key));
		pr_err("hfs: Invalid key length: %d\n", key_len);
		return;
	}

	hfs_bnode_read(node, key, off, key_len);
}

+6 −0
Original line number Diff line number Diff line
@@ -67,6 +67,12 @@ void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off)
	else
		key_len = tree->max_key_len + 2;

	if (key_len > sizeof(hfsplus_btree_key) || key_len < 1) {
		memset(key, 0, sizeof(hfsplus_btree_key));
		pr_err("hfsplus: Invalid key length: %d\n", key_len);
		return;
	}

	hfs_bnode_read(node, key, off, key_len);
}

Loading