qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/3] char-socket: Fix race condition
@ 2019-02-22 13:46 Alberto Garcia
  2019-02-22 13:46 ` [Qemu-devel] [PATCH v3 1/3] main-loop: Fix GSource leak in qio_task_thread_worker() Alberto Garcia
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Alberto Garcia @ 2019-02-22 13:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alberto Garcia, Paolo Bonzini, Daniel P . Berrangé,
	Marc-André Lureau

This fixes a race condition in which the tcp_chr_read() ioc handler
can close a connection that is being written to from another thread.

Note: vhost-user-test still fails if QTEST_VHOST_USER_FIXME is set.

Berto

RFC: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg01510.html

v1: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg01834.html
- Fixes memory leaks and adds a qemu_idle_add() function

v2: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg06137.html
- Rebased on top of the current master (fc3dbb90f2eb069801bfb4cfe9cbc)
- Patches 1 and 2: Remove the changes in char-pty.c, they're not
                   needed after the rebase.
- Patch 3: Fix conflicts after the rebase.

v3:
- Patch 3: Add tcp_chr_disconnect_locked() [Daniel]

Alberto Garcia (3):
  main-loop: Fix GSource leak in qio_task_thread_worker()
  main-loop: Add qemu_idle_add()
  char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

 chardev/char-socket.c    | 25 +++++++++++++++++++++----
 include/qemu/main-loop.h | 12 ++++++++++++
 io/task.c                |  9 +++------
 util/main-loop.c         |  9 +++++++++
 4 files changed, 45 insertions(+), 10 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2019-07-16 12:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 13:46 [Qemu-devel] [PATCH v3 0/3] char-socket: Fix race condition Alberto Garcia
2019-02-22 13:46 ` [Qemu-devel] [PATCH v3 1/3] main-loop: Fix GSource leak in qio_task_thread_worker() Alberto Garcia
2019-02-22 13:46 ` [Qemu-devel] [PATCH v3 2/3] main-loop: Add qemu_idle_add() Alberto Garcia
2019-02-22 13:46 ` [Qemu-devel] [PATCH v3 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout() Alberto Garcia
2019-02-22 13:51   ` Daniel P. Berrangé
2019-07-16  9:56   ` Max Reitz
2019-03-05 15:52 ` [Qemu-devel] [PATCH v3 0/3] char-socket: Fix race condition Alberto Garcia
2019-03-05 15:55   ` Marc-André Lureau
2019-03-06 10:58     ` Paolo Bonzini
2019-04-23 16:55 ` Daniel P. Berrangé
2019-04-23 16:55   ` Daniel P. Berrangé
2019-04-26  7:51   ` Paolo Bonzini
2019-04-26  7:51     ` Paolo Bonzini
2019-06-05 19:36     ` Max Reitz
2019-07-03 17:51       ` Max Reitz
2019-07-04  9:59         ` Paolo Bonzini
2019-07-16 12:55 ` Andrey Shinkevich

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).