diff options
author | Alan Somers <asomers@FreeBSD.org> | 2019-08-14 20:45:00 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2019-08-14 20:45:00 +0000 |
commit | bf507497734c43167087bff79100377c3f74e058 (patch) | |
tree | 61ffb111a3dc0220de78043534520c4296f21d79 /sys/fs/fuse/fuse_internal.c | |
parent | ea0a30b14507592144d7f2218d75de0cf52a2b07 (diff) | |
download | src-bf507497734c43167087bff79100377c3f74e058.tar.gz src-bf507497734c43167087bff79100377c3f74e058.zip |
fusefs: Fix the size of fuse_getattr_in
In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased.
However, the fusefs driver is currently not sending the additional fields.
In our implementation, the additional fields are always zero, so I there
haven't been any test failures until now. But fusefs-lkl requires the
request's length to be correct.
Fix this bug, and also enhance the test suite to catch similar bugs.
PR: 239830
MFC after: 2 weeks
MFC-With: 350665
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=351042
Diffstat (limited to 'sys/fs/fuse/fuse_internal.c')
-rw-r--r-- | sys/fs/fuse/fuse_internal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index 5301e4cf9cf5..d201c3be5b3b 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -868,7 +868,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, enum vtype vtyp; int err; - fdisp_init(&fdi, 0); + fdisp_init(&fdi, sizeof(*fgai)); fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred); fgai = fdi.indata; /* @@ -877,7 +877,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, * care. */ fgai->getattr_flags = 0; - if ((err = fdisp_simple_putget_vp(&fdi, FUSE_GETATTR, vp, td, cred))) { + if ((err = fdisp_wait_answ(&fdi))) { if (err == ENOENT) fuse_internal_vnode_disappear(vp); goto out; |