diff options
| author | Paolo Bonzini | 2015-07-09 08:55:38 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2015-07-24 13:57:45 +0200 |
| commit | ab28bd23125fb4a0411c3a3f01c4edacbc261486 (patch) | |
| tree | 50cf40b9f83a43d2a7b6dee4a801e6c31fc409ee /tests | |
| parent | scsi: fix buffer overflow in scsi_req_parse_cdb (CVE-2015-5158) (diff) | |
| download | qemu-ab28bd23125fb4a0411c3a3f01c4edacbc261486.tar.gz qemu-ab28bd23125fb4a0411c3a3f01c4edacbc261486.tar.xz qemu-ab28bd23125fb4a0411c3a3f01c4edacbc261486.zip | |
rcu: actually register threads that have RCU read-side critical sections
Otherwise, grace periods are detected too early!
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-rcu-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c index 4c5f62e996..daa8bf41db 100644 --- a/tests/test-rcu-list.c +++ b/tests/test-rcu-list.c @@ -108,6 +108,8 @@ static void *rcu_q_reader(void *arg) long long n_reads_local = 0; struct list_element *el; + rcu_register_thread(); + *(struct rcu_reader_data **)arg = &rcu_reader; atomic_inc(&nthreadsrunning); while (goflag == GOFLAG_INIT) { @@ -129,6 +131,8 @@ static void *rcu_q_reader(void *arg) qemu_mutex_lock(&counts_mutex); n_reads += n_reads_local; qemu_mutex_unlock(&counts_mutex); + + rcu_unregister_thread(); return NULL; } |
