On Sun, Aug 30, 2020 at 01:14:24PM +0300, Leon Romanovsky wrote: > diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c > index 62fbb0ae9cb4..90fc74106620 100644 > +++ b/drivers/infiniband/core/restrack.c > @@ -330,6 +330,9 @@ void rdma_restrack_del(struct rdma_restrack_entry *res) > rt = &dev->res[res->type]; > > old = xa_erase(&rt->xa, res->id); > + if (!old && > + (res->type == RDMA_RESTRACK_MR || res->type == RDMA_RESTRACK_QP)) > + return; > WARN_ON(old != res); > res->valid = false; What is this for? It doesn't seem to have anything to do with the cm change. Calling rdma_testrack_del() on a yet to be added ID should early exit from !valid right? Jason