diff options
| author | 2020-12-29 18:46:53 -0800 | |
|---|---|---|
| committer | 2021-01-07 16:37:11 -0400 | |
| commit | f2bc3af6353cb2a33dfa9d270d999d839eef54cb (patch) | |
| tree | c6f158c01dc4919e6957b40be489d3e5684456b9 /lib/math/git:/ssh:/git@git.zx2c4.com | |
| parent | RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp (diff) | |
| download | linux-dev-f2bc3af6353cb2a33dfa9d270d999d839eef54cb.tar.xz linux-dev-f2bc3af6353cb2a33dfa9d270d999d839eef54cb.zip | |
RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd()
In ocrdma_dealloc_ucontext_pd() uctx->cntxt_pd is assigned to the variable
pd and then after uctx->cntxt_pd is freed, the variable pd is passed to
function _ocrdma_dealloc_pd() which dereferences pd directly or through
its call to ocrdma_mbx_dealloc_pd().
Reorder the free using the variable pd.
Cc: stable@vger.kernel.org
Fixes: 21a428a019c9 ("RDMA: Handle PD allocations by IB/core")
Link: https://lore.kernel.org/r/20201230024653.1516495-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'lib/math/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
