* [PATCH net] net/mlx4: double free of dev_vfs
@ 2015-06-01 14:41 clsoto
2015-06-01 14:41 ` [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice clsoto
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: clsoto @ 2015-06-01 14:41 UTC (permalink / raw)
To: davem; +Cc: netdev, amirv, jackm, brking, clsoto
If user loads mlx4_core with num_vfs greater than supported
then variable dev->dev_vfs is freed 2 times after unloading
the driver.
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2685,6 +2685,7 @@ disable_sriov:
free_mem:
dev->persist->num_vfs = 0;
kfree(dev->dev_vfs);
+ dev->dev_vfs = NULL;
return dev_flags & ~MLX4_FLAG_MASTER;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice
2015-06-01 14:41 [PATCH net] net/mlx4: double free of dev_vfs clsoto
@ 2015-06-01 14:41 ` clsoto
2015-06-02 7:25 ` Or Gerlitz
2015-06-01 14:41 ` [PATCH net] net/mlx4: fix typo in mlx4_set_vf_mac clsoto
2015-06-02 7:25 ` [PATCH net] net/mlx4: double free of dev_vfs Or Gerlitz
2 siblings, 1 reply; 5+ messages in thread
From: clsoto @ 2015-06-01 14:41 UTC (permalink / raw)
To: davem; +Cc: netdev, amirv, jackm, brking, clsoto
If mlx4_enable_sriov is called by adapter without this
feature MLX4_DEV_CAP_FLAG2_SYS_EQS then during this
path the function alloc icm is called twice without
freeing the structures from the first time.
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2837,6 +2837,7 @@ slave_start:
existing_vfs,
reset_flow);
+ mlx4_close_fw(dev);
mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL);
dev->flags = dev_flags;
if (!SRIOV_VALID_STATE(dev->flags)) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net] net/mlx4: fix typo in mlx4_set_vf_mac
2015-06-01 14:41 [PATCH net] net/mlx4: double free of dev_vfs clsoto
2015-06-01 14:41 ` [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice clsoto
@ 2015-06-01 14:41 ` clsoto
2015-06-02 7:25 ` [PATCH net] net/mlx4: double free of dev_vfs Or Gerlitz
2 siblings, 0 replies; 5+ messages in thread
From: clsoto @ 2015-06-01 14:41 UTC (permalink / raw)
To: davem; +Cc: netdev, amirv, jackm, brking, clsoto
fix typo in mlx4_set_vf_mac
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -2687,7 +2687,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev
port = mlx4_slaves_closest_port(dev, slave, port);
s_info = &priv->mfunc.master.vf_admin[slave].vport[port];
s_info->mac = mac;
- mlx4_info(dev, "default mac on vf %d port %d to %llX will take afect only after vf restart\n",
+ mlx4_info(dev, "default mac on vf %d port %d to %llX will take effect only after vf restart\n",
vf, port, s_info->mac);
return 0;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice
2015-06-01 14:41 ` [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice clsoto
@ 2015-06-02 7:25 ` Or Gerlitz
0 siblings, 0 replies; 5+ messages in thread
From: Or Gerlitz @ 2015-06-02 7:25 UTC (permalink / raw)
To: clsoto
Cc: David Miller, Linux Netdev List, Amir Vadai, Jack Morgenstein, brking
On Mon, Jun 1, 2015 at 5:41 PM, <clsoto@linux.vnet.ibm.com> wrote:
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -2837,6 +2837,7 @@ slave_start:
> existing_vfs,
> reset_flow);
>
> + mlx4_close_fw(dev);
> mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL);
> dev->flags = dev_flags;
> if (!SRIOV_VALID_STATE(dev->flags)) {
>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx4: double free of dev_vfs
2015-06-01 14:41 [PATCH net] net/mlx4: double free of dev_vfs clsoto
2015-06-01 14:41 ` [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice clsoto
2015-06-01 14:41 ` [PATCH net] net/mlx4: fix typo in mlx4_set_vf_mac clsoto
@ 2015-06-02 7:25 ` Or Gerlitz
2 siblings, 0 replies; 5+ messages in thread
From: Or Gerlitz @ 2015-06-02 7:25 UTC (permalink / raw)
To: clsoto
Cc: David Miller, Linux Netdev List, Amir Vadai, Jack Morgenstein, brking
On Mon, Jun 1, 2015 at 5:41 PM, <clsoto@linux.vnet.ibm.com> wrote:
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -2685,6 +2685,7 @@ disable_sriov:
> free_mem:
> dev->persist->num_vfs = 0;
> kfree(dev->dev_vfs);
> + dev->dev_vfs = NULL;
> return dev_flags & ~MLX4_FLAG_MASTER;
> }
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-02 7:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 14:41 [PATCH net] net/mlx4: double free of dev_vfs clsoto
2015-06-01 14:41 ` [PATCH net] net/mlx4: need to call close fw if alloc icm is called twice clsoto
2015-06-02 7:25 ` Or Gerlitz
2015-06-01 14:41 ` [PATCH net] net/mlx4: fix typo in mlx4_set_vf_mac clsoto
2015-06-02 7:25 ` [PATCH net] net/mlx4: double free of dev_vfs Or Gerlitz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.