diff options
author | Robert Mustacchi <rm@fingolfin.org> | 2020-11-06 12:46:06 -0800 |
---|---|---|
committer | Robert Mustacchi <rm@fingolfin.org> | 2020-11-17 08:05:23 -0800 |
commit | 7fdea60d55a95f0e46066fd021c4ef1b1321bafc (patch) | |
tree | 74c9c31007b985180751dc05ff0945d2d1b9b01c | |
parent | f0b6369dcf843cd097edef20ec38c11b7ae127d6 (diff) | |
download | illumos-joyent-7fdea60d55a95f0e46066fd021c4ef1b1321bafc.tar.gz |
13300 mlxcx_cq_setup() doesn't take required locks for ASSERTs
Reviewed by: Paul Winder <paul@winder.uk.net>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Alex Wilson <alex@cooperi.net>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/uts/common/io/mlxcx/mlxcx_ring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/src/uts/common/io/mlxcx/mlxcx_ring.c b/usr/src/uts/common/io/mlxcx/mlxcx_ring.c index 17a09b9cae..6ce37ef1a0 100644 --- a/usr/src/uts/common/io/mlxcx/mlxcx_ring.c +++ b/usr/src/uts/common/io/mlxcx/mlxcx_ring.c @@ -378,12 +378,14 @@ mlxcx_cq_setup(mlxcx_t *mlxp, mlxcx_event_queue_t *eq, mutex_exit(&cq->mlcq_mtx); mutex_enter(&eq->mleq_mtx); + mutex_enter(&cq->mlcq_arm_mtx); mutex_enter(&cq->mlcq_mtx); ASSERT0(cq->mlcq_state & MLXCX_CQ_EQAVL); avl_add(&eq->mleq_cqs, cq); atomic_or_uint(&cq->mlcq_state, MLXCX_CQ_EQAVL); mlxcx_arm_cq(mlxp, cq); mutex_exit(&cq->mlcq_mtx); + mutex_exit(&cq->mlcq_arm_mtx); mutex_exit(&eq->mleq_mtx); *cqp = cq; |