X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=kernel%2Ffs%2Fcifs%2Fioctl.c;h=64a9bca976d053dccc8f1b9b8adcf49ecd4f70cb;hb=refs%2Fchanges%2F53%2F2653%2F1;hp=8b7898b7670f88c3ea9ec596129ef569eed183bd;hpb=342fa5dfa053559f47caad657132522496dcf1b3;p=kvmfornfv.git diff --git a/kernel/fs/cifs/ioctl.c b/kernel/fs/cifs/ioctl.c index 8b7898b76..64a9bca97 100644 --- a/kernel/fs/cifs/ioctl.c +++ b/kernel/fs/cifs/ioctl.c @@ -67,6 +67,12 @@ static long cifs_ioctl_clone(unsigned int xid, struct file *dst_file, goto out_drop_write; } + if (src_file.file->f_op->unlocked_ioctl != cifs_ioctl) { + rc = -EBADF; + cifs_dbg(VFS, "src file seems to be from a different filesystem type\n"); + goto out_fput; + } + if ((!src_file.file->private_data) || (!dst_file->private_data)) { rc = -EBADF; cifs_dbg(VFS, "missing cifsFileInfo on copy range src file\n");