Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Jason Wang
On 12/22/2014 01:28 PM, Amos Kong wrote: > On Mon, Dec 22, 2014 at 11:48:29AM +0800, Jason Wang wrote: >> On 12/19/2014 09:25 PM, Amos Kong wrote: >>> Passing some invalid fds in QEMU commandline, the fds don't exist. >>> QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", >>> and

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Amos Kong
On Mon, Dec 22, 2014 at 11:48:29AM +0800, Jason Wang wrote: > > On 12/19/2014 09:25 PM, Amos Kong wrote: > > Passing some invalid fds in QEMU commandline, the fds don't exist. > > QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", > > and coredump in setting queues. > > > > This

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Jason Wang
On 12/19/2014 09:25 PM, Amos Kong wrote: > Passing some invalid fds in QEMU commandline, the fds don't exist. > QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", > and coredump in setting queues. > > This patch checked return value of first operate to fd, QEMU will > report erro

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-19 Thread Eric Blake
On 12/19/2014 06:25 AM, Amos Kong wrote: > Passing some invalid fds in QEMU commandline, the fds don't exist. > QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", > and coredump in setting queues. > > This patch checked return value of first operate to fd, QEMU will > report erro

[Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-19 Thread Amos Kong
Passing some invalid fds in QEMU commandline, the fds don't exist. QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", and coredump in setting queues. This patch checked return value of first operate to fd, QEMU will report error and exit without coredump. It's effected for both n