Commit 67e24858 authored by Neal Cardwell's avatar Neal Cardwell Committed by Greg Kroah-Hartman
Browse files

ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()



[ Upstream commit e1a67642 ]

inet_getpeer_v4() can return NULL under OOM conditions, and while
inet_peer_xrlim_allow() is OK with a NULL peer, inet_putpeer() will
crash.

This code path now uses the same idiom as the others from:
1d861aa4 ("inet: Minimize use of
cached route inetpeer.").

Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1322cf6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment