Re: [PATCH 2/2] monitor: Report EBADFD if fdset contains invalid FD

2021-08-18 Thread Daniel P . Berrangé
On Tue, Aug 17, 2021 at 01:59:22PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Aug 17, 2021 at 12:56 PM Michal Privoznik > wrote: > > > When opening a path that starts with "/dev/fdset/" the control > > jumps into qemu_parse_fdset() and then into > > monitor_fdset_dup_fd_add(). In here, cor

Re: [PATCH 2/2] monitor: Report EBADFD if fdset contains invalid FD

2021-08-17 Thread Michal Prívozník
On 8/17/21 11:59 AM, Marc-André Lureau wrote: > Hi > > On Tue, Aug 17, 2021 at 12:56 PM Michal Privoznik > wrote: > >> When opening a path that starts with "/dev/fdset/" the control >> jumps into qemu_parse_fdset() and then into >> monitor_fdset_dup_fd_add(). In here, corresponding fdset is foun

Re: [PATCH 2/2] monitor: Report EBADFD if fdset contains invalid FD

2021-08-17 Thread Marc-André Lureau
Hi On Tue, Aug 17, 2021 at 12:56 PM Michal Privoznik wrote: > When opening a path that starts with "/dev/fdset/" the control > jumps into qemu_parse_fdset() and then into > monitor_fdset_dup_fd_add(). In here, corresponding fdset is found > and then all FDs from the set are iterated over trying

[PATCH 2/2] monitor: Report EBADFD if fdset contains invalid FD

2021-08-17 Thread Michal Privoznik
When opening a path that starts with "/dev/fdset/" the control jumps into qemu_parse_fdset() and then into monitor_fdset_dup_fd_add(). In here, corresponding fdset is found and then all FDs from the set are iterated over trying to find an FD that matches expected access mode. For instance, if calle