android_kernel_motorola_sm6225/drivers/infiniband
Fan Guo d6d76e0280 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: 2c34e68f42 ("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>
2020-06-30 23:17:11 -04:00
..
core RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads() 2020-06-30 23:17:11 -04:00
hw RDMA/qedr: Fix KASAN: use-after-free in ucma_event_handler+0x532 2020-06-30 23:17:11 -04:00
sw net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2020-04-29 16:31:17 +02:00
ulp IB/ipoib: Fix double free of skb in case of multicast traffic in CM mode 2020-06-03 08:19:40 +02:00
Kconfig IB/ucm: fix UCM link error 2018-08-21 16:56:32 -06:00
Makefile