]> git.proxmox.com Git - mirror_qemu.git/commit
virtiofsd: Fix fuse setxattr() API change issue
authorVivek Goyal <vgoyal@redhat.com>
Tue, 22 Jun 2021 15:08:46 +0000 (11:08 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 5 Jul 2021 09:51:26 +0000 (10:51 +0100)
commit061624455fc3e4a19caeba321b284548127d858e
tree733fbe499dcfe63f1427c5c5c731d4968f7cb37b
parent1d03e5660711c40f79917054328e0dc6bcb879a3
virtiofsd: Fix fuse setxattr() API change issue

With kernel header updates fuse_setxattr_in struct has grown in size.
But this new struct size only takes affect if user has opted in
for fuse feature FUSE_SETXATTR_EXT otherwise fuse continues to
send "fuse_setxattr_in" of older size. Older size is determined
by FUSE_COMPAT_SETXATTR_IN_SIZE.

Fix this. If we have not opted in for FUSE_SETXATTR_EXT, then
expect that we will get fuse_setxattr_in of size FUSE_COMPAT_SETXATTR_IN_SIZE
and not sizeof(struct fuse_sexattr_in).

Fixes: 278f064e4524 ("Update Linux headers to 5.13-rc4")
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20210622150852.1507204-2-vgoyal@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_common.h
tools/virtiofsd/fuse_lowlevel.c