]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
IB/mlx4: Fix ib device initialization error flow
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 21 Mar 2017 10:57:05 +0000 (12:57 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:50:30 +0000 (10:50 +0200)
BugLink: http://bugs.launchpad.net/bugs/1692898
commit 99e68909d5aba1861897fe7afc3306c3c81b6de0 upstream.

In mlx4_ib_add, procedure mlx4_ib_alloc_eqs is called to allocate EQs.

However, in the mlx4_ib_add error flow, procedure mlx4_ib_free_eqs is not
called to free the allocated EQs.

Fixes: e605b743f33d ("IB/mlx4: Increase the number of vectors (EQs) available for ULPs")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/infiniband/hw/mlx4/main.c

index 7031a8dd4d1404d439dafcb90af38b610774cc05..71a99b9daa5232b696041ee04efa4af4bf32aceb 100644 (file)
@@ -2935,6 +2935,7 @@ err_counter:
                mlx4_ib_delete_counters_table(ibdev, &ibdev->counters_table[i]);
 
 err_map:
+       mlx4_ib_free_eqs(dev, ibdev);
        iounmap(ibdev->uar_map);
 
 err_uar: