On Wed, Feb 21, 2018 at 11:26:34AM -0700, Jason Gunthorpe wrote: > On Wed, Feb 21, 2018 at 08:18:27PM +0200, Leon Romanovsky wrote: > > > > > + } else { > > > > + /* It is done in _ib_create_qp for other QP types */ > > > > + qp->uobject = &obj->uevent.uobject; > > > > } > > > > > > Steve got rid of this line to make sure the uobject was init'd during > > > restrack add, so why is adding it back here OK for XRC? > > > > Steve got rid of this line to determine kernel vs. user QPs and not > > because of being XRC. XRC QPs are not participating in restrack > > and IB_QPT_XRC_TGT actually needs this qp->object to be initialized. > > But can we not set it someplace where it doesn't break the restrack > assumption even though we don't care today? It is exactly the right place, you can see the following code above: 1520 if (cmd->qp_type == IB_QPT_XRC_TGT) 1521 qp = ib_create_qp(pd, &attr); 1522 else 1523 qp = _ib_create_qp(device, pd, &attr, uhw, 1524 &obj->uevent.uobject); So it has nothing to do with restrack assumption, but with the fact that IB_QPT_XRC_TGT QPs are created with ib_create_qp() which is kernel version and it doesn't have &obj->uevent.uobject. This area (QP creation) worth cleanup, but this patch is good for now and fixes real user triggered oops, which is now in Linus's master too. Thanks > > Jason > -- > 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
Attachment:
signature.asc
Description: PGP signature