Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af109bca authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

fuse: check create mode in atomic open



Verify that the VFS is passing us a complete create mode with the S_IFREG to
atomic open.

Reported-by: default avatarSteve <steveamigauk@yahoo.co.uk>
Reported-by: default avatarRichard W.M. Jones <rjones@redhat.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
parent 38227f78
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -383,6 +383,9 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
	struct fuse_entry_out outentry;
	struct fuse_entry_out outentry;
	struct fuse_file *ff;
	struct fuse_file *ff;


	/* Userspace expects S_IFREG in create mode */
	BUG_ON((mode & S_IFMT) != S_IFREG);

	forget = fuse_alloc_forget();
	forget = fuse_alloc_forget();
	err = -ENOMEM;
	err = -ENOMEM;
	if (!forget)
	if (!forget)