mbox series

[v3,0/2] net: tap: check file descriptor can be used

Message ID 20200701193951.36248-1-lvivier@redhat.com (mailing list archive)
Headers show
Series net: tap: check file descriptor can be used | expand

Message

Laurent Vivier July 1, 2020, 7:39 p.m. UTC
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(-)

Comments

Laurent Vivier July 6, 2020, 8:21 a.m. UTC | #1
Hi,

ping.

I think it would be good to have this fix in next release.

Thanks,
Laurent

On 01/07/2020 21:39, Laurent Vivier wrote:
> 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(-)
>