Re: [Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-29 Thread Greg Kurz
On Tue, 29 Jun 2021 09:22:36 -0400 Vivek Goyal wrote: > On Tue, Jun 29, 2021 at 03:03:43PM +0200, Greg Kurz wrote: > > On Mon, 28 Jun 2021 16:31:27 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > > getxattr/setxattr/removexattr/listxattr operat

Re: [Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-29 Thread Vivek Goyal
On Tue, Jun 29, 2021 at 03:03:43PM +0200, Greg Kurz wrote: > On Mon, 28 Jun 2021 16:31:27 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > getxattr/setxattr/removexattr/listxattr operations handle regualar > > > and non-regular files differently. For th

Re: [Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-29 Thread Greg Kurz
On Mon, 28 Jun 2021 16:31:27 +0100 "Dr. David Alan Gilbert" wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > getxattr/setxattr/removexattr/listxattr operations handle regualar > > and non-regular files differently. For the case of non-regular files > > we do fchdir(/proc/self/fd) and the xat

Re: [Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-28 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > getxattr/setxattr/removexattr/listxattr operations handle regualar > and non-regular files differently. For the case of non-regular files > we do fchdir(/proc/self/fd) and the xattr operation and then revert > back to original working directory. After this

[Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-22 Thread Vivek Goyal
getxattr/setxattr/removexattr/listxattr operations handle regualar and non-regular files differently. For the case of non-regular files we do fchdir(/proc/self/fd) and the xattr operation and then revert back to original working directory. After this we are saving errno and that's buggy because fch