diff options
author | Fan Guo <guofan5@huawei.com> | 2020-06-12 09:38:24 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-06-30 22:38:04 +0300 |
commit | 1e865dd2d489ce2659484aa133189b05130eb13e (patch) | |
tree | 63035793eb91baeebfb4da5c3209fa2a7b172c90 /.mailmap | |
parent | 5ef8e112ddac71c11f9519067fb920a7595190f3 (diff) | |
download | linux-1e865dd2d489ce2659484aa133189b05130eb13e.tar.xz |
RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
[ Upstream commit a17f4bed811c60712d8131883cdba11a105d0161 ]
If ib_dma_mapping_error() returns non-zero value,
ib_mad_post_receive_mads() will jump out of loops and return -ENOMEM
without freeing mad_priv. Fix this memory-leak problem by freeing mad_priv
in this case.
Fixes: 2c34e68f4261 ("IB/mad: Check and handle potential DMA mapping errors")
Link: https://lore.kernel.org/r/20200612063824.180611-1-guofan5@huawei.com
Signed-off-by: Fan Guo <guofan5@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions