]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
IB/mlx5: Free mpi in mp_slave mode
authorDanit Goldberg <danitg@mellanox.com>
Mon, 16 Sep 2019 06:48:18 +0000 (09:48 +0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:26:03 +0000 (04:26 -0400)
commit69ae9acdbee75da280707d5d5311fcb72973434c
tree357f5e0bcf4d4ff1cd8886625a54ddbe040c52be
parent2e6010904e8381ad5aeca12963869cd415234656
IB/mlx5: Free mpi in mp_slave mode

BugLink: https://bugs.launchpad.net/bugs/1848046
commit 5d44adebbb7e785939df3db36ac360f5e8b73e44 upstream.

ib_add_slave_port() allocates a multiport struct but never frees it.
Don't leak memory, free the allocated mpi struct during driver unload.

Cc: <stable@vger.kernel.org>
Fixes: 32f69e4be269 ("{net, IB}/mlx5: Manage port association for multiport RoCE")
Link: https://lore.kernel.org/r/20190916064818.19823-3-leon@kernel.org
Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/infiniband/hw/mlx5/main.c