qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] Fix segfault in blockjob race condition
@ 2017-11-20  2:46 Jeff Cody
  2017-11-20  2:46 ` [Qemu-devel] [PATCH 1/5] blockjob: do not allow coroutine double entry or entry-after-completion Jeff Cody
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Jeff Cody @ 2017-11-20  2:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, mreitz, stefanha, famz, pbonzini, kwolf

This series fixes a race condition segfault when using iothreads with
blockjobs.

The qemu iotest in this series is a reproducer, as is the reproducer
script attached in this bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=1508708

There are two additional patches to try and catch this sort of scenario
with an abort, before a segfault or memory corruption occurs.

Jeff Cody (5):
  blockjob: do not allow coroutine double entry or
    entry-after-completion
  coroutine: abort if we try to enter coroutine scheduled for another
    ctx
  coroutines: abort if we try to enter a still-sleeping coroutine
  qemu-iotests: add option in common.qemu for mismatch only
  qemu-iotest: add test for blockjob coroutine race condition

 blockjob.c                     |  9 ++--
 include/qemu/coroutine_int.h   |  5 +++
 tests/qemu-iotests/200         | 99 ++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/200.out     | 14 ++++++
 tests/qemu-iotests/common.qemu |  8 +++-
 tests/qemu-iotests/group       |  1 +
 util/async.c                   |  7 +++
 util/qemu-coroutine-sleep.c    |  3 ++
 util/qemu-coroutine.c          | 14 ++++++
 9 files changed, 156 insertions(+), 4 deletions(-)
 create mode 100755 tests/qemu-iotests/200
 create mode 100644 tests/qemu-iotests/200.out

-- 
2.9.5

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

end of thread, other threads:[~2017-11-21 12:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20  2:46 [Qemu-devel] [PATCH 0/5] Fix segfault in blockjob race condition Jeff Cody
2017-11-20  2:46 ` [Qemu-devel] [PATCH 1/5] blockjob: do not allow coroutine double entry or entry-after-completion Jeff Cody
2017-11-20 11:16   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-11-20 13:36     ` Jeff Cody
2017-11-21 10:47       ` Stefan Hajnoczi
2017-11-20 22:25     ` Paolo Bonzini
2017-11-21 12:42       ` Kevin Wolf
2017-11-20  2:46 ` [Qemu-devel] [PATCH 2/5] coroutine: abort if we try to enter coroutine scheduled for another ctx Jeff Cody
2017-11-20 11:28   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-11-20 13:42     ` Jeff Cody
2017-11-20  2:46 ` [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine Jeff Cody
2017-11-20 11:43   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-11-20 13:45     ` Jeff Cody
2017-11-21 10:17       ` Stefan Hajnoczi
2017-11-20 22:30   ` [Qemu-devel] " Paolo Bonzini
2017-11-20 22:35     ` Jeff Cody
2017-11-20 22:47       ` Paolo Bonzini
2017-11-20 23:08         ` Jeff Cody
2017-11-20 23:13           ` Paolo Bonzini
2017-11-20 23:31             ` Jeff Cody
2017-11-20  2:46 ` [Qemu-devel] [PATCH 4/5] qemu-iotests: add option in common.qemu for mismatch only Jeff Cody
2017-11-20  2:46 ` [Qemu-devel] [PATCH 5/5] qemu-iotest: add test for blockjob coroutine race condition Jeff Cody

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