Skip to content

Commit

Permalink
MDEV-26558 Fix a deadlock due to cyclic dependence
Browse files Browse the repository at this point in the history
Fix a potential deadlock bug between locks ctrl_mutex and entry->mutex
  • Loading branch information
ryancaicse authored and robertbindar committed Nov 24, 2021
1 parent ef179da commit f809a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extra/mariabackup/xbstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ extract_worker_thread_func(void *arg)
}

if (chunk.type == XB_CHUNK_TYPE_EOF) {
pthread_mutex_lock(ctxt->mutex);
pthread_mutex_unlock(&entry->mutex);
pthread_mutex_lock(ctxt->mutex);
my_hash_delete(ctxt->filehash, (uchar *) entry);
pthread_mutex_unlock(ctxt->mutex);

Expand Down

0 comments on commit f809a4f

Please sign in to comment.