Skip to content

net: tap: check file descriptor can be used

Laurent Vivier qemu-devel 4 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesApplied
  2. v32 patches 8 repliesSuperseded
  3. v22 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch19 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2net: check if the file descriptor is valid before using itinclude/qemu/sockets.h net/socket.c net/tap.c +2 more+79 -390 replies
2/2net: detect errors from probing vnet hdr flag for TAP devicesnet/tap-bsd.c net/tap-linux.c net/tap-solaris.c +3 more+29 -121 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDr. David Alan GilbertPhilippe Mathieu-Daudé
1/2R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] net: tap: check file descriptor can be used

v4: use qemu_try_set_nonblock() with vhostfd in net_init_tap_one(),
and with fd in net_init_socket()

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: check if the file descriptor is valid before using it

 include/qemu/sockets.h |  1 +
 net/socket.c           |  9 +++++--
 net/tap-bsd.c          |  2 +-
 net/tap-linux.c        |  8 +++---
 net/tap-solaris.c      |  2 +-
 net/tap-stub.c         |  2 +-
 net/tap.c              | 50 +++++++++++++++++++++++++++++-------
 net/tap_int.h          |  2 +-
 util/oslib-posix.c     | 26 +++++++++++++------
 util/oslib-win32.c     | 57 ++++++++++++++++++++++++------------------
 10 files changed, 108 insertions(+), 51 deletions(-)
Signature · 1 line
2.26.2