Re: [PATCH for-rc] RDMA/irdma: Fix a user-after-free in add_pble_prm

From: Jason Gunthorpe
Date: Tue Dec 07 2021 - 12:51:03 EST


On Tue, Dec 07, 2021 at 09:21:36AM -0600, Shiraz Saleem wrote:
> When irdma_hmc_sd_one fails, 'chunk' is freed while its still on the PBLE
> info list.
>
> Add the chunk entry to the PBLE info list only after successful setting of
> the SD in irdma_hmc_sd_one.
>
> Fixes: e8c4dbc2fcac ("RDMA/irdma: Add PBLE resource manager")
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> ---
> drivers/infiniband/hw/irdma/pble.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc, thanks

Jason