diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-10-29 09:27:31 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-06 22:38:28 +0300 |
commit | be4a8d46732a45e78aa27c34b58431a917cd644d (patch) | |
tree | 2f51f0816e9f301563584fb9712f9f7d0109ffe0 /drivers/infiniband/hw/mlx5 | |
parent | 874e476ba949deb475378e10df7527921e4ff6c1 (diff) | |
download | linux-be4a8d46732a45e78aa27c34b58431a917cd644d.tar.xz |
RDMA/mad: Allocate zeroed MAD buffer
Ensure that MAD output buffer is zero-based allocated in all the callers
of process_mad and remove the various memset()'s from the drivers.
Link: https://lore.kernel.org/r/20191029062745.7932-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mad.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 348c1df69cdc..0a5eb6e1798c 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -284,8 +284,6 @@ int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, *out_mad_size != sizeof(*out_mad))) return IB_MAD_RESULT_FAILURE; - memset(out_mad->data, 0, sizeof(out_mad->data)); - if (MLX5_CAP_GEN(dev->mdev, vport_counters) && in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT && in_mad->mad_hdr.method == IB_MGMT_METHOD_GET) { |