aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/smbfs/smbfs_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/smbfs/smbfs_io.c')
-rw-r--r--sys/fs/smbfs/smbfs_io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index 6c4b199b921f..5037bd9d8005 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -186,6 +186,12 @@ smbfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred)
struct smb_cred scred;
int error, lks;
+ /*
+ * Protect against method which is not supported for now
+ */
+ if (uiop->uio_segflg == UIO_NOCOPY)
+ return EOPNOTSUPP;
+
if (vp->v_type != VREG && vp->v_type != VDIR) {
SMBFSERR("vn types other than VREG or VDIR are unsupported !\n");
return EIO;