On Fri, Feb 11, 2022 at 06:37:50PM -0600, Bob Pearson wrote: > > The mcast attachment is affiliated with a QP, when all the QPs are > > destroyed, which are rdma-core objects, then all attachments should be > > free'd as well. That should have happened by the time things get here > > > > I would expect a simple WARN_ON that the rb tree is empty in destroy > > to catch any bugs. > > > > Jason > > I wrote a simple user test case that calls ibv_attach_mcast() and > then sleeps. If I type ^C the qp is detached as you predicted so > someone is counting them somewhere. It isn't obvious in rdma-core. QP destroy is done inside the kernel in all the uverbs stuff, detatch from multicast during QP destroy should have been inside RXE's qp destroy function. > never get called since someone above me is actively cleaning them up > from failed apps. Or we can just drop this patch and assume it isn't > needed. I mean drop this patch and just put a WARN_ON to assert the rb tree is empty before destroying the memory that holds it, just in case someone adds a bug someday. Jason