linux-stable/drivers/infiniband
Bob Pearson 8fc1b7027f RDMA/rxe: Fix coding error in rxe_rcv_mcast_pkt
rxe_rcv_mcast_pkt() in rxe_recv.c can leak SKBs in error path code. The
loop over the QPs attached to a multicast group creates new cloned SKBs
for all but the last QP in the list and passes the SKB and its clones to
rxe_rcv_pkt() for further processing. Any QPs that do not pass some checks
are skipped.  If the last QP in the list fails the tests the SKB is
leaked.  This patch checks if the SKB for the last QP was used and if not
frees it. Also removes a redundant loop invariant assignment.

Fixes: 8700e3e7c4 ("Soft RoCE driver")
Fixes: 71abf20b28 ("RDMA/rxe: Handle skb_clone() failure in rxe_recv.c")
Link: https://lore.kernel.org/r/20210128174752.16128-1-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-02-05 13:44:22 -04:00
..
core RDMA/core: Introduce and use API to read port immutable data 2021-02-05 12:06:01 -04:00
hw IB/mlx5: Use rdma_for_each_port for port iteration 2021-02-05 12:06:01 -04:00
sw RDMA/rxe: Fix coding error in rxe_rcv_mcast_pkt 2021-02-05 13:44:22 -04:00
ulp IB/iser: Simplify prot_caps setting 2021-01-19 20:02:07 -04:00
Kconfig RDMA/umem: Support importing dma-buf as user memory region 2021-01-20 16:07:52 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00