Skip to content
Snippets Groups Projects
  1. Jan 08, 2022
  2. Jan 07, 2022
  3. Nov 16, 2021
    • Hanna Reitz's avatar
      transactions: Invoke clean() after everything else · 079bff69
      Hanna Reitz authored
      
      Invoke the transaction drivers' .clean() methods only after all
      .commit() or .abort() handlers are done.
      
      This makes it easier to have nested transactions where the top-level
      transactions pass objects to lower transactions that the latter can
      still use throughout their commit/abort phases, while the top-level
      transaction keeps a reference that is released in its .clean() method.
      
      (Before this commit, that is also possible, but the top-level
      transaction would need to take care to invoke tran_add() before the
      lower-level transaction does.  This commit makes the ordering
      irrelevant, which is just a bit nicer.)
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20211111120829.81329-8-hreitz@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20211115145409.176785-8-kwolf@redhat.com>
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      079bff69
  4. Nov 10, 2021
  5. Nov 02, 2021
  6. Oct 28, 2021
  7. Oct 15, 2021
  8. Oct 14, 2021
  9. Oct 13, 2021
  10. Sep 30, 2021
  11. Sep 29, 2021
  12. Sep 27, 2021
    • Markus Armbruster's avatar
      qapi: Convert simple union SocketAddressLegacy to flat one · 935a867c
      Markus Armbruster authored
      
      Simple unions predate flat unions.  Having both complicates the QAPI
      schema language and the QAPI generator.  We haven't been using simple
      unions in new code for a long time, because they are less flexible and
      somewhat awkward on the wire.
      
      To prepare for their removal, convert simple union SocketAddressLegacy
      to an equivalent flat one, with existing enum SocketAddressType
      replacing implicit enum type SocketAddressLegacyKind.  Adds some
      boilerplate to the schema, which is a bit ugly, but a lot easier to
      maintain than the simple union feature.
      
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210917143134.412106-9-armbru@redhat.com>
      935a867c
  13. Sep 15, 2021
  14. Sep 13, 2021
  15. Sep 07, 2021
  16. Sep 06, 2021
    • Michael Tokarev's avatar
      qemu-sockets: fix unix socket path copy (again) · 118d527f
      Michael Tokarev authored
      Commit 4cfd970e added an
      assert which ensures the path within an address of a unix
      socket returned from the kernel is at least one byte and
      does not exceed sun_path buffer. Both of this constraints
      are wrong:
      
      A unix socket can be unnamed, in this case the path is
      completely empty (not even \0)
      
      And some implementations (notable linux) can add extra
      trailing byte (\0) _after_ the sun_path buffer if we
      passed buffer larger than it (and we do).
      
      So remove the assertion (since it causes real-life breakage)
      but at the same time fix the usage of sun_path. Namely,
      we should not access sun_path[0] if kernel did not return
      it at all (this is the case for unnamed sockets),
      and use the returned salen when copyig actual path as an
      upper constraint for the amount of bytes to copy - this
      will ensure we wont exceed the information provided by
      the kernel, regardless whenever there is a trailing \0
      or not. This also helps with unnamed sockets.
      
      Note the case of abstract socket, the sun_path is actually
      a blob and can contain \0 characters, - it should not be
      passed to g_strndup and the like, it should be accessed by
      memcpy-like functions.
      
      Fixes: 4cfd970e
      Fixes: http://bugs.debian.org/993145
      
      
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      CC: qemu-stable@nongnu.org
      118d527f
  17. Aug 04, 2021
  18. Jul 26, 2021
    • Richard Henderson's avatar
      util/selfmap: Discard mapping on error · 53645dc4
      Richard Henderson authored
      
      From clang-13:
      util/selfmap.c:26:21: error: variable 'errors' set but not used \
          [-Werror,-Wunused-but-set-variable]
      
      Quite right of course, but there's no reason not to check errors.
      
      First, incrementing errors is incorrect, because qemu_strtoul
      returns an errno not a count -- just or them together so that
      we have a non-zero value at the end.
      
      Second, if we have an error, do not add the struct to the list,
      but free it instead.
      
      Cc: Alex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      53645dc4
  19. Jul 22, 2021
  20. Jul 21, 2021
  21. Jul 20, 2021
  22. Jul 09, 2021
Loading