Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-07-01 Thread Laurent Vivier
On 01/07/2020 07:50, Markus Armbruster wrote: > Laurent Vivier writes: > >> qemu_set_nonblock() checks that the file descriptor can be used and, if >> not, crashes QEMU. An assert() is used for that. The use of assert() is >> used to detect programming error and the coredump will allow to debug >

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Markus Armbruster
Laurent Vivier writes: > qemu_set_nonblock() checks that the file descriptor can be used and, if > not, crashes QEMU. An assert() is used for that. The use of assert() is > used to detect programming error and the coredump will allow to debug > the problem. > > But in the case of the tap device,

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Laurent Vivier
On 30/06/2020 18:06, Greg Kurz wrote: > On Tue, 30 Jun 2020 16:57:36 +0200 > Laurent Vivier wrote: > >> qemu_set_nonblock() checks that the file descriptor can be used and, if >> not, crashes QEMU. An assert() is used for that. The use of assert() is >> used to detect programming error and the co

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Greg Kurz
On Tue, 30 Jun 2020 16:57:36 +0200 Laurent Vivier wrote: > qemu_set_nonblock() checks that the file descriptor can be used and, if > not, crashes QEMU. An assert() is used for that. The use of assert() is > used to detect programming error and the coredump will allow to debug > the problem. > >

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 4:57 PM, Laurent Vivier wrote: > qemu_set_nonblock() checks that the file descriptor can be used and, if > not, crashes QEMU. An assert() is used for that. The use of assert() is > used to detect programming error and the coredump will allow to debug > the problem. > > But in the case o

[PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Laurent Vivier
qemu_set_nonblock() checks that the file descriptor can be used and, if not, crashes QEMU. An assert() is used for that. The use of assert() is used to detect programming error and the coredump will allow to debug the problem. But in the case of the tap device, this assert() can be triggered by a