Re: [PATCH net] net/mlx5e: Fix del vxlan port command
On Wed, Jul 20, 2016 at 7:15 PM, Alexei Starovoitovwrote: > On Wed, Jul 20, 2016 at 05:48:48PM +0300, Saeed Mahameed wrote: >> mlx5e_vxlan_core_del_port_cmd cleared the wrong address, the address of >> the pointer of the buffer rather than clearing the buffer itself. >> >> This can lead to a serious stack corruption. > > The change is fine, but commit log is complete nonsense. > Nacking to make sure it's adjusted. > We cannot have such commits in the git history. That was my hunch too :) , will fix this.
Re: [PATCH net] net/mlx5e: Fix del vxlan port command
On Wed, Jul 20, 2016 at 05:48:48PM +0300, Saeed Mahameed wrote: > mlx5e_vxlan_core_del_port_cmd cleared the wrong address, the address of > the pointer of the buffer rather than clearing the buffer itself. > > This can lead to a serious stack corruption. The change is fine, but commit log is complete nonsense. Nacking to make sure it's adjusted. We cannot have such commits in the git history. > Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") > Signed-off-by: Saeed Mahameed> --- > drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c > b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c > index 05de772..e25a73ed 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c > @@ -72,8 +72,8 @@ static int mlx5e_vxlan_core_del_port_cmd(struct > mlx5_core_dev *mdev, u16 port) > u32 in[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_in)]; > u32 out[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_out)]; > > - memset(, 0, sizeof(in)); > - memset(, 0, sizeof(out)); > + memset(in, 0, sizeof(in)); > + memset(out, 0, sizeof(out)); > > MLX5_SET(delete_vxlan_udp_dport_in, in, opcode, >MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT); > -- > 2.8.0 >
[PATCH net] net/mlx5e: Fix del vxlan port command
mlx5e_vxlan_core_del_port_cmd cleared the wrong address, the address of the pointer of the buffer rather than clearing the buffer itself. This can lead to a serious stack corruption. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Saeed Mahameed--- drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c index 05de772..e25a73ed 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c @@ -72,8 +72,8 @@ static int mlx5e_vxlan_core_del_port_cmd(struct mlx5_core_dev *mdev, u16 port) u32 in[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_in)]; u32 out[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_out)]; - memset(, 0, sizeof(in)); - memset(, 0, sizeof(out)); + memset(in, 0, sizeof(in)); + memset(out, 0, sizeof(out)); MLX5_SET(delete_vxlan_udp_dport_in, in, opcode, MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT); -- 2.8.0