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

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

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

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

[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