mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-06 04:33:58 +08:00
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>
This commit is contained in:
parent
e1395a321e
commit
5114a04e6c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user