> > > On Thu, Feb 08, 2018 at 12:09:43PM -0800, Steve Wise wrote: > > > > + case RDMA_RESTRACK_QP: > > > > + qp = container_of(res, struct ib_qp, res); > > > > + if (qp->pd) > > > > + is_user = qp->pd->uobject; > > > > > > ?? Why is this like this? > > > > > > struct ib_qp has a uboject, why do we need to look at the PD? > > > > I wasn't getting the correct user/kernel setting when I used qp->uobject. > > Perhaps I should revisit this. > > Oh that answer certainly makes me nervous.. Let's explain that please > and either change it or add a big fat comment here about why it has to > be like this. > I see the problem: in uverbs_cmd.c:create_qp(), the call to _ib_create_qp() happens before qp->uobject is initialized. I'll move the initialization of qp->uobject to before the call to _ib_create_qp(), test it out, and send a new patch. Thanks Jason! Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html