]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/mlx5: Fix wrong free of blue flame register on error
authorMark Bloch <mbloch@nvidia.com>
Wed, 13 Jan 2021 12:17:03 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:22:38 +0000 (18:22 +0100)
commitb1f2d446fd8951d4ab772765c8b9008024f02f1a
tree6c5c9aa4570a45657e98d6590ba55c8e050e78ec
parent25469b2e852311ddb1fa05b9a517972f252a892d
RDMA/mlx5: Fix wrong free of blue flame register on error

commit 1c3aa6bd0b823105c2030af85d92d158e815d669 upstream.

If the allocation of the fast path blue flame register fails, the driver
should free the regular blue flame register allocated a statement above,
not the one that it just failed to allocate.

Fixes: 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stages")
Link: https://lore.kernel.org/r/20210113121703.559778-6-leon@kernel.org
Reported-by: Hans Petter Selasky <hanss@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/main.c