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:

committed by
Jason Gunthorpe

父節點
874e476ba9
當前提交
be4a8d4673
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user