Skip to content

chardev: Fix issues found by vhost-user-test

Fabiano Rosas qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4chardev: Fix QIOChannel refcountchardev/char-io.c+5 -01 reply
2/4chardev: Don't attempt to unregister yank function more than oncechardev/char-socket.c+2 -11 reply
3/4chardev: Consolidate yank registrationchardev/char-socket.c+6 -251 reply
4/4chardev: Introduce a lock for hup_sourcechardev/char-socket.c chardev/char.c include/chardev/char.h+7 -07 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchDaniel P. Berrangé
1/4R-b
2/4R-b
3/4R-b
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] chardev: Fix issues found by vhost-user-test

Running vhost-user-test with ASAN on a loaded machine reveals several intermittent issues. These show up every time I test the qtest tree so I'm trying to get rid of them.

1- UAF of IOWatchPoll.
This one is self explanatory, ASAN caught it.

2- Reference counting issues in glib. It seems it's possible to unref
a source while adding a callback to it, and glib asserts. This shows up on all architectures, only on the ASAN build after hundreds of iterations.

3- Extra yank_unregister_function call leads to abort(). This shows up
on all architectures, but it's quite hidden due to vhost-user-test using a dedicated server thread which dies and causes timeouts in the test.

Manifests as assert(s->fds_num) failing. Only on the ASAN build, after tens of iterations (quite common).

Thanks

Fabiano Rosas (4):
chardev: Fix QIOChannel refcount
chardev: Don't attempt to unregister yank function more than once
chardev: Consolidate yank registration
chardev: Introduce a lock for hup_source

 chardev/char-io.c      |  5 +++++
 chardev/char-socket.c  | 38 ++++++++++++--------------------------
 chardev/char.c         |  2 ++
 include/chardev/char.h |  1 +
 4 files changed, 20 insertions(+), 26 deletions(-)
Signature · 1 line
2.35.3