Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fuse: do not allow mapping a non-regular backing file

We do not support passthrough operations other than read/write on
regular file, so allowing non-regular backing files makes no sense.

Fixes: efad7153bf93 ("fuse: allow O_PATH fd for FUSE_DEV_IOC_BACKING_OPEN")
Cc: stable@vger.kernel.org
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

authored by

Amir Goldstein and committed by
Miklos Szeredi
e9c8da67 1b237f19

+5
+5
fs/fuse/passthrough.c
··· 237 237 if (!file) 238 238 goto out; 239 239 240 + /* read/write/splice/mmap passthrough only relevant for regular files */ 241 + res = d_is_dir(file->f_path.dentry) ? -EISDIR : -EINVAL; 242 + if (!d_is_reg(file->f_path.dentry)) 243 + goto out_fput; 244 + 240 245 backing_sb = file_inode(file)->i_sb; 241 246 res = -ELOOP; 242 247 if (backing_sb->s_stack_depth >= fc->max_stack_depth)