Date: Tue, 17 Jul 2018 09:18:16 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336377 - head/sys/ofed/drivers/infiniband/core Message-ID: <201807170918.w6H9IGYf013504@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Jul 17 09:18:16 2018 New Revision: 336377 URL: https://svnweb.freebsd.org/changeset/base/336377 Log: Fix kernel panic while using XRC_TGT QP type in ibcore. Attempt to modify XRC_TGT QP type from the user space (ibv_xsrq_pingpong invocation) will trigger the following kernel panic. It is caused by the fact that such QPs missed uobject initialization. Linux commit: f45765872e7aae7b81feb3044aaf9886b21885ef MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:16:54 2018 (r336376) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:18:16 2018 (r336377) @@ -1943,6 +1943,9 @@ static int create_qp(struct ib_uverbs_file *file, atomic_inc(&attr.srq->usecnt); if (ind_tbl) atomic_inc(&ind_tbl->usecnt); + } else { + /* It is done in _ib_create_qp for other QP types */ + qp->uobject = &obj->uevent.uobject; } qp->uobject = &obj->uevent.uobject;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807170918.w6H9IGYf013504>