]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/ocrdma: Don't NULL deref uctx on errors in ocrdma_copy_pd_uresp()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 28 Apr 2026 16:17:42 +0000 (13:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2026 13:31:16 +0000 (15:31 +0200)
commitec44c00a4fe1327efa35083f98b39c01cb535a51
tree0ef57c78cb4854862c977b840e5aa5c6df79b2dd
parent6fd93142dd1d09000c3750af08270f5792523fe9
RDMA/ocrdma: Don't NULL deref uctx on errors in ocrdma_copy_pd_uresp()

commit 34fbf48cf3b410d2a6e8c586fa952a36331ca5ba upstream.

Sashiko points out that pd->uctx isn't initialized until late in the
function so all these error flow references are NULL and will crash. Use
the uctx that isn't NULL.

Cc: stable@vger.kernel.org
Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
Link: https://sashiko.dev/#/patchset/0-v1-e911b76a94d1%2B65d95-rdma_udata_rep_jgg%40nvidia.com?part=4
Link: https://patch.msgid.link/r/9-v1-41f3135e5565+9d2-rdma_ai_fixes1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c