> From: linux-rdma-owner@xxxxxxxxxxxxxxx <linux-rdma- > owner@xxxxxxxxxxxxxxx> On Behalf Of Devesh Sharma > drivers/infiniband/hw/bnxt_re/bnxt_re.h | 13 +- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 635 ++++++++++++++++++++--------- [..] > + > + /* remove from active qp list */ > + mutex_lock(&rdev->qp_lock); > + list_del(&gsi_sqp->list); > + atomic_dec(&rdev->qp_count); Atomic inc/dec/read should not be protected using qp_lock mutex. Please take it outside the critical section in new refactor code and in old one. > + mutex_unlock(&rdev->qp_lock);