[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201230053125.GB6438@unreal>
Date: Wed, 30 Dec 2020 07:31:25 +0200
From: Leon Romanovsky <leon@...nel.org>
To: trix@...hat.com
Cc: selvin.xavier@...adcom.com, devesh.sharma@...adcom.com,
dledford@...hat.com, jgg@...pe.ca, maxg@...lanox.com,
galpress@...zon.com, michaelgur@...dia.com, monis@...lanox.com,
gustavoars@...nel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RDMA/ocrdma: fix use after free in
ocrdma_dealloc_ucontext_pd()
On Tue, Dec 29, 2020 at 06:46:53PM -0800, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
>
> 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.
>
> Fixes: 21a428a019c9 ("RDMA: Handle PD allocations by IB/core")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists