Re: [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd

2012-09-18 Thread David Gibson
On Tue, Sep 18, 2012 at 01:29:04PM +0200, Andreas Färber wrote: > Am 18.09.2012 02:08, schrieb David Gibson: > > On Mon, Sep 17, 2012 at 01:24:51PM -0500, Anthony Liguori wrote: > >> David Gibson writes: > >> > >>> tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does > >>> not

Re: [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd

2012-09-18 Thread Andreas Färber
Am 18.09.2012 02:08, schrieb David Gibson: > On Mon, Sep 17, 2012 at 01:24:51PM -0500, Anthony Liguori wrote: >> David Gibson writes: >> >>> tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does >>> not check if the fd it is using is valid (>= 0) before passing it to >>> qemu_se

Re: [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd

2012-09-17 Thread David Gibson
On Mon, Sep 17, 2012 at 01:24:51PM -0500, Anthony Liguori wrote: > David Gibson writes: > > > tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does > > not check if the fd it is using is valid (>= 0) before passing it to > > qemu_set_fd_handler2(). If using e.g. a TCP serial p

Re: [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd

2012-09-17 Thread Anthony Liguori
David Gibson writes: > tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does > not check if the fd it is using is valid (>= 0) before passing it to > qemu_set_fd_handler2(). If using e.g. a TCP serial port, which is not > initially connected, this can result in -1 being passed

[Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd

2012-09-09 Thread David Gibson
tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does not check if the fd it is using is valid (>= 0) before passing it to qemu_set_fd_handler2(). If using e.g. a TCP serial port, which is not initially connected, this can result in -1 being passed to FD_ISSET, which has undefin