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

2020-06-30 Thread Laurent Vivier
On 30/06/2020 14:35, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 02:00:06PM +0200, Laurent Vivier wrote: >> On 30/06/2020 13:03, Daniel P. Berrangé wrote: >>> On Tue, Jun 30, 2020 at 12:35:46PM +0200, Laurent Vivier wrote: On 30/06/2020 12:03, Jason Wang wrote: > > On 2020/6/30

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

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 02:00:06PM +0200, Laurent Vivier wrote: > On 30/06/2020 13:03, Daniel P. Berrangé wrote: > > On Tue, Jun 30, 2020 at 12:35:46PM +0200, Laurent Vivier wrote: > >> On 30/06/2020 12:03, Jason Wang wrote: > >>> > >>> On 2020/6/30 下午5:45, Laurent Vivier wrote: > On 30/06/202

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

2020-06-30 Thread Laurent Vivier
On 30/06/2020 13:03, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 12:35:46PM +0200, Laurent Vivier wrote: >> On 30/06/2020 12:03, Jason Wang wrote: >>> >>> On 2020/6/30 下午5:45, Laurent Vivier wrote: On 30/06/2020 11:31, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 10:23:18AM

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

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 12:35:46PM +0200, Laurent Vivier wrote: > On 30/06/2020 12:03, Jason Wang wrote: > > > > On 2020/6/30 下午5:45, Laurent Vivier wrote: > >> On 30/06/2020 11:31, Daniel P. Berrangé wrote: > >>> On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: > On Tue, J

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

2020-06-30 Thread Jason Wang
On 2020/6/30 下午6:35, Laurent Vivier wrote: On 30/06/2020 12:03, Jason Wang wrote: On 2020/6/30 下午5:45, Laurent Vivier wrote: On 30/06/2020 11:31, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wan

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

2020-06-30 Thread Laurent Vivier
On 30/06/2020 12:03, Jason Wang wrote: > > On 2020/6/30 下午5:45, Laurent Vivier wrote: >> On 30/06/2020 11:31, Daniel P. Berrangé wrote: >>> On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: > On 2020/6/30 上午3:30

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

2020-06-30 Thread Jason Wang
On 2020/6/30 下午5:45, Laurent Vivier wrote: On 30/06/2020 11:31, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: On 2020/6/30 上午3:30, Laurent Vivier wrote: On 28/06/2020 08:31, Jason Wan

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

2020-06-30 Thread Jason Wang
On 2020/6/30 下午5:31, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: On 2020/6/30 上午3:30, Laurent Vivier wrote: On 28/06/2020 08:31, Jason Wang wrote: On 2020/6/25 下午7:56, Laurent Vivie

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

2020-06-30 Thread Laurent Vivier
On 30/06/2020 11:31, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: >> On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: >>> >>> On 2020/6/30 上午3:30, Laurent Vivier wrote: On 28/06/2020 08:31, Jason Wang wrote: > On 2020/6/25 下午7:5

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

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: > > > > On 2020/6/30 上午3:30, Laurent Vivier wrote: > > > On 28/06/2020 08:31, Jason Wang wrote: > > > > On 2020/6/25 下午7:56, Laurent Vivier wrote: > > > > > On 25/06/20

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

2020-06-30 Thread Jason Wang
On 2020/6/30 上午3:30, Laurent Vivier wrote: On 28/06/2020 08:31, Jason Wang wrote: On 2020/6/25 下午7:56, Laurent Vivier wrote: On 25/06/2020 10:48, Daniel P. Berrangé wrote: On Wed, Jun 24, 2020 at 09:00:09PM +0200, Laurent Vivier wrote: qemu_set_nonblock() checks that the file descriptor can

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

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: > > On 2020/6/30 上午3:30, Laurent Vivier wrote: > > On 28/06/2020 08:31, Jason Wang wrote: > > > On 2020/6/25 下午7:56, Laurent Vivier wrote: > > > > On 25/06/2020 10:48, Daniel P. Berrangé wrote: > > > > > On Wed, Jun 24, 2020 at 09:00:09PM

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

2020-06-29 Thread Laurent Vivier
On 28/06/2020 08:31, Jason Wang wrote: > > On 2020/6/25 下午7:56, Laurent Vivier wrote: >> On 25/06/2020 10:48, Daniel P. Berrangé wrote: >>> On Wed, Jun 24, 2020 at 09:00:09PM +0200, Laurent Vivier wrote: qemu_set_nonblock() checks that the file descriptor can be used and, if not, crashes

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

2020-06-27 Thread Jason Wang
On 2020/6/25 下午7:56, Laurent Vivier wrote: On 25/06/2020 10:48, Daniel P. Berrangé wrote: On Wed, Jun 24, 2020 at 09:00:09PM +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(

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

2020-06-25 Thread Laurent Vivier
On 25/06/2020 10:48, Daniel P. Berrangé wrote: > On Wed, Jun 24, 2020 at 09:00:09PM +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

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

2020-06-25 Thread Daniel P . Berrangé
On Wed, Jun 24, 2020 at 09:00:09PM +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] net: tap: check if the file descriptor is valid before using it

2020-06-25 Thread Philippe Mathieu-Daudé
On 6/25/20 9:38 AM, Laurent Vivier wrote: > On 25/06/2020 08:19, Philippe Mathieu-Daudé wrote: >> On 6/24/20 9:00 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 >>> use

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

2020-06-25 Thread Laurent Vivier
On 25/06/2020 08:19, Philippe Mathieu-Daudé wrote: > On 6/24/20 9:00 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 w

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

2020-06-24 Thread Philippe Mathieu-Daudé
On 6/24/20 9:00 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] net: tap: check if the file descriptor is valid before using it

2020-06-24 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