Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5114a04e authored by Carol L Soto's avatar Carol L Soto Committed by David S. Miller
Browse files

net/mlx4_core: double free of dev_vfs



If user loads mlx4_core with num_vfs greater than
supported then variable dev->dev_vfs is freed 2 times after unloading the
driver.

Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarCarol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e1395a32
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2824,6 +2824,7 @@ static u64 mlx4_enable_sriov(struct mlx4_dev *dev, struct pci_dev *pdev,
free_mem:
	dev->persist->num_vfs = 0;
	kfree(dev->dev_vfs);
        dev->dev_vfs = NULL;
	return dev_flags & ~MLX4_FLAG_MASTER;
}