diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2016-05-18 22:23:20 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2016-05-18 22:23:20 +0000 |
commit | c6b304514390d338b71f6412071b736df83d0bd5 (patch) | |
tree | c2411a54529c87236b8977e0d618edfe55b88276 | |
parent | 047e60c94a85e1381cd4e18c9e845ec34d5164a9 (diff) | |
download | FreeBSD-src-c6b304514390d338b71f6412071b736df83d0bd5.zip FreeBSD-src-c6b304514390d338b71f6412071b736df83d0bd5.tar.gz |
If a local (AF_LOCAL, AF_UNIX) socket creation (bind) is attempted
on a fuse mounted file system, it will crash. Although it may be
possible to make this work correctly, this patch avoids the crash
in the meantime.
I removed the MPASS(), since panicing for the FIFO case didn't make
a lot of sense when it returns an error for the others.
PR: 195000
Submitted by: henry.hu.sh@gmail.com (earlier version)
MFC after: 2 weeks
-rw-r--r-- | sys/fs/fuse/fuse_vnops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 6672f42..71d7422 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -335,8 +335,9 @@ fuse_vnop_create(struct vop_create_args *ap) /* XXX: Will we ever want devices ? */ if ((vap->va_type != VREG)) { - MPASS(vap->va_type != VFIFO); - goto bringup; + printf("fuse_vnop_create: unsupported va_type %d\n", + vap->va_type); + return (EINVAL); } debug_printf("parent nid = %ju, mode = %x\n", (uintmax_t)parentnid, mode); @@ -364,7 +365,7 @@ fuse_vnop_create(struct vop_create_args *ap) debug_printf("create: got err=%d from daemon\n", err); goto out; } -bringup: + feo = fdip->answ; if ((err = fuse_internal_checkentry(feo, VREG))) { |