* [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs
@ 2015-06-02 21:07 clsoto
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: clsoto @ 2015-06-02 21:07 UTC (permalink / raw)
To: davem; +Cc: netdev, ogerlitz, brking, Carol L Soto
From: Carol L Soto <clsoto@linux.vnet.ibm.com>
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>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 0dbd704..9485cbe 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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice
2015-06-02 21:07 [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs clsoto
@ 2015-06-02 21:07 ` clsoto
2015-06-04 3:13 ` David Miller
2015-06-02 21:07 ` [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac clsoto
2015-06-04 3:13 ` [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs David Miller
2 siblings, 1 reply; 6+ messages in thread
From: clsoto @ 2015-06-02 21:07 UTC (permalink / raw)
To: davem; +Cc: netdev, ogerlitz, brking, Carol Soto
From: Carol Soto <clsoto@linux.vnet.ibm.com>
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.
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 9485cbe..7d57777 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2976,6 +2976,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)) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac
2015-06-02 21:07 [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs clsoto
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
@ 2015-06-02 21:07 ` clsoto
2015-06-04 3:13 ` David Miller
2015-06-04 3:13 ` [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs David Miller
2 siblings, 1 reply; 6+ messages in thread
From: clsoto @ 2015-06-02 21:07 UTC (permalink / raw)
To: davem; +Cc: netdev, ogerlitz, brking, Carol Soto
From: Carol Soto <clsoto@linux.vnet.ibm.com>
fix typo in mlx4_set_vf_mac
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
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(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index 91d8344..68ae765 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -2917,7 +2917,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac)
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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs
2015-06-02 21:07 [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs clsoto
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
2015-06-02 21:07 ` [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac clsoto
@ 2015-06-04 3:13 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-06-04 3:13 UTC (permalink / raw)
To: clsoto; +Cc: netdev, ogerlitz, brking
From: clsoto@linux.vnet.ibm.com
Date: Tue, 2 Jun 2015 16:07:23 -0500
> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
@ 2015-06-04 3:13 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-06-04 3:13 UTC (permalink / raw)
To: clsoto; +Cc: netdev, ogerlitz, brking
From: clsoto@linux.vnet.ibm.com
Date: Tue, 2 Jun 2015 16:07:24 -0500
> From: Carol Soto <clsoto@linux.vnet.ibm.com>
>
> 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.
>
> Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac
2015-06-02 21:07 ` [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac clsoto
@ 2015-06-04 3:13 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-06-04 3:13 UTC (permalink / raw)
To: clsoto; +Cc: netdev, ogerlitz, brking
From: clsoto@linux.vnet.ibm.com
Date: Tue, 2 Jun 2015 16:07:25 -0500
> From: Carol Soto <clsoto@linux.vnet.ibm.com>
>
> fix typo in mlx4_set_vf_mac
>
> Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-04 3:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 21:07 [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs clsoto
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
2015-06-04 3:13 ` David Miller
2015-06-02 21:07 ` [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac clsoto
2015-06-04 3:13 ` David Miller
2015-06-04 3:13 ` [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).