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>
This commit is contained in:
Leon Romanovsky
2019-10-29 08:27:31 +02:00
committed by Jason Gunthorpe
父節點 874e476ba9
當前提交 be4a8d4673
共有 5 個文件被更改,包括 2 次插入14 次删除

查看文件

@@ -675,7 +675,6 @@ int ocrdma_pma_counters(struct ocrdma_dev *dev,
{
struct ib_pma_portcounters *pma_cnt;
memset(out_mad->data, 0, sizeof out_mad->data);
pma_cnt = (void *)(out_mad->data + 40);
ocrdma_update_stats(dev);