]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/rxe: Handle skb_clone() failure in rxe_recv.c
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 13 Oct 2020 18:42:37 +0000 (13:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:03 +0000 (10:08 +0100)
commit99d1a5c2130562b679a55a8d4e0997abb7c66d4c
treeb43814173e02ab3689d1288dc91f3557ecf91d99
parentab5faad5bd334e1a21e56318098025dc8cc004b4
RDMA/rxe: Handle skb_clone() failure in rxe_recv.c

[ Upstream commit 71abf20b28ff87fee6951ec2218d5ce7969c4e87 ]

If skb_clone() is unable to allocate memory for a new sk_buff this is not
detected by the current code.

Check for a NULL return and continue. This is similar to other errors in
this loop over QPs attached to the multicast address and consistent with
the unreliable UD transport.

Fixes: e7ec96fc7932f ("RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt()")
Addresses-Coverity-ID: 1497804: Null pointer dereferences (NULL_RETURNS)
Link: https://lore.kernel.org/r/20201013184236.5231-1-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_recv.c