On Wed, Jan 15, 2020 at 10:50:50AM +0200, Leon Romanovsky wrote: > From: Jack Morgenstein <jackm@xxxxxxxxxxxxxxxxxx> > > In procedure mlx4_ib_add_gid(), if the driver is unable to > update the FW gid table, there is a memory leak in the driver's > copy of the gid table: the gid entry's context buffer is not freed. > > If such an error occurs, free the entry's context buffer, and mark the > entry as available (by setting its context pointer to NULL). > > Fixes: e26be1bfef81 ("IB/mlx4: Implement ib_device callbacks") > Signed-off-by: Jack Morgenstein <jackm@xxxxxxxxxxxxxxxxxx> > Reviewed-by: Parav Pandit <parav@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) Applied to for-next, thanks Jason