qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] net: tap: check file descriptor can be used
@ 2020-07-01 19:39 Laurent Vivier
  2020-07-01 19:39 ` [PATCH v3 1/2] net: tap: check if the file descriptor is valid before using it Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Laurent Vivier @ 2020-07-01 19:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Daniel P. Berrangé, Stefan Weil, Jason Wang,
	Markus Armbruster, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé

v3: move qemu_fd_is_valid() checking into a new function
    qemu_try_set_nonblock(), and use qemu_try_set_nonblock() in
    qemu_set_nonblock().

v2: Add patch from Daniel to check the fd can be used

    I have updated Daniel's patch not to check for EINVAL on TUNGETIFF
    as I think we can avoid this special case because TUNGETIFF
    is available since kernel v2.6.27 (October 2008)
    Moreover I think the code was wrong as it was checking with -EINVAL and
    not EINVAL.

Daniel P. Berrang�� (1):
  net: detect errors from probing vnet hdr flag for TAP devices

Laurent Vivier (1):
  net: tap: check if the file descriptor is valid before using it

 include/qemu/sockets.h |  1 +
 net/tap-bsd.c          |  2 +-
 net/tap-linux.c        |  8 +++---
 net/tap-solaris.c      |  2 +-
 net/tap-stub.c         |  2 +-
 net/tap.c              | 41 ++++++++++++++++++++++++------
 net/tap_int.h          |  2 +-
 util/oslib-posix.c     | 26 +++++++++++++------
 util/oslib-win32.c     | 57 ++++++++++++++++++++++++------------------
 9 files changed, 93 insertions(+), 48 deletions(-)

-- 
2.26.2




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-07 10:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-01 19:39 [PATCH v3 0/2] net: tap: check file descriptor can be used Laurent Vivier
2020-07-01 19:39 ` [PATCH v3 1/2] net: tap: check if the file descriptor is valid before using it Laurent Vivier
2020-07-02  8:00   ` Philippe Mathieu-Daudé
2020-07-02  8:17     ` Laurent Vivier
2020-07-02  8:18       ` Philippe Mathieu-Daudé
2020-07-06  8:45         ` Philippe Mathieu-Daudé
2020-07-07  7:56   ` Jason Wang
2020-07-07 10:21     ` Laurent Vivier
2020-07-01 19:39 ` [PATCH v3 2/2] net: detect errors from probing vnet hdr flag for TAP devices Laurent Vivier
2020-07-06  8:47   ` Philippe Mathieu-Daudé
2020-07-06  8:21 ` [PATCH v3 0/2] net: tap: check file descriptor can be used Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).