From: David S. Miller Date: Tue, 21 Feb 2012 22:59:19 +0000 (-0500) Subject: ipv4: ping: Fix recvmsg MSG_OOB error handling. X-Git-Tag: v3.3-rc6~36^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5e7424d424f6398a198ead79d99e0a3c2f24ce8;p=platform%2Fkernel%2Flinux-stable.git ipv4: ping: Fix recvmsg MSG_OOB error handling. Don't return an uninitialized variable as the error, return -EOPNOTSUPP instead. Reported-by: Dave Jones Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index aea5a19..b072386 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -630,6 +630,7 @@ static int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, pr_debug("ping_recvmsg(sk=%p,sk->num=%u)\n", isk, isk->inet_num); + err = -EOPNOTSUPP; if (flags & MSG_OOB) goto out;