diff options
author | Carol L Soto <clsoto@linux.vnet.ibm.com> | 2015-06-02 16:07:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-03 20:12:58 -0700 |
commit | 5114a04e6c73a0c6e74737e801b8a3b3d40c7e36 (patch) | |
tree | 0f180afcd9dc0ff1373e0dd2cb8a26482e0d72d5 /drivers/net/ethernet/mellanox/mlx4/main.c | |
parent | e1395a321eab1a7833d82e952eb8255e0a1f03cb (diff) |
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: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 0dbd70427221..9485cbef5166 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -2824,6 +2824,7 @@ disable_sriov: free_mem: dev->persist->num_vfs = 0; kfree(dev->dev_vfs); + dev->dev_vfs = NULL; return dev_flags & ~MLX4_FLAG_MASTER; } |