qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e88718: slirp: use DIV_ROUND_UP


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e88718: slirp: use DIV_ROUND_UP
Date: Mon, 17 Jul 2017 03:14:39 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e88718fc0b0399147327adfb369793407482a895
      
https://github.com/qemu/qemu/commit/e88718fc0b0399147327adfb369793407482a895
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-07-15 (Sat, 15 Jul 2017)

  Changed paths:
    M slirp/ip6.h

  Log Message:
  -----------
  slirp: use DIV_ROUND_UP

I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extra

Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 12dccfe4f57ead8166567ec8a60d2ce91e266f04
      
https://github.com/qemu/qemu/commit/12dccfe4f57ead8166567ec8a60d2ce91e266f04
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-15 (Sat, 15 Jul 2017)

  Changed paths:
    M slirp/misc.c

  Log Message:
  -----------
  slirp: fork_exec(): Don't close() a negative number in fork_exec()

In a fork_exec() error path we try to closesocket(s) when s might
be a negative number because the thing that failed was the
qemu_socket() call. Add a guard so we don't do this.

(Spotted by Coverity: CID 1005727 issue 1 of 2.)

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 0b466065eba289c437e3edc2e97144fc5cd6a889
      
https://github.com/qemu/qemu/commit/0b466065eba289c437e3edc2e97144fc5cd6a889
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-15 (Sat, 15 Jul 2017)

  Changed paths:
    M slirp/socket.c

  Log Message:
  -----------
  slirp: Handle error returns from slirp_send() in sosendoob()

The code in sosendoob() assumes that slirp_send() always
succeeds, but it might return an OS error code (for instance
if the other end has disconnected). Catch these and return
the caller either -1 on error or the number of urgent bytes
actually written. (None of the callers check this return
value currently, though.)

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 75cb298d905030fca897ea1d80e409c7f7e3e5ea
      
https://github.com/qemu/qemu/commit/75cb298d905030fca897ea1d80e409c7f7e3e5ea
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-15 (Sat, 15 Jul 2017)

  Changed paths:
    M slirp/sbuf.c
    M slirp/socket.c

  Log Message:
  -----------
  slirp: Handle error returns from sosendoob()

sosendoob() can return a failure code, but all its callers ignore it.
This is OK in sbappend(), as the comment there states -- we will try
again later in sowrite(). Add a (void) cast to tell Coverity so.
In sowrite() we do need to check the return value -- we should handle
a write failure in sosendoob() the same way we handle a write failure
for the normal data.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: acbaa0f4fd0491d222b718688244e629aa188b3c
      
https://github.com/qemu/qemu/commit/acbaa0f4fd0491d222b718688244e629aa188b3c
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M slirp/ip6.h
    M slirp/misc.c
    M slirp/sbuf.c
    M slirp/socket.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into 
staging

slirp updates

# gpg: Signature made Sat 15 Jul 2017 13:30:03 BST
# gpg:                using RSA key 0xB0A51BF58C9179C5
# gpg: Good signature from "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: AEBF 7448 FAB9 453A 4552  390E B0A5 1BF5 8C91 79C5

* remotes/thibault/tags/samuel-thibault:
  slirp: Handle error returns from sosendoob()
  slirp: Handle error returns from slirp_send() in sosendoob()
  slirp: fork_exec(): Don't close() a negative number in fork_exec()
  slirp: use DIV_ROUND_UP

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/2286468facec...acbaa0f4fd04

reply via email to

[Prev in Thread] Current Thread [Next in Thread]