From: Lorenzo Colitti Date: Wed, 3 Jul 2013 15:52:49 +0000 (+0900) Subject: net: ipv6: add missing lock in ping_v6_sendmsg X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1bdc45580fc19e968b32ad27cd7e476a4aa58f6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: ipv6: add missing lock in ping_v6_sendmsg Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index 2b52046e1263..10b975577e91 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -174,6 +174,7 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, if (hlimit < 0) hlimit = ip6_dst_hoplimit(dst); + lock_sock(sk); err = ip6_append_data(sk, ping_getfrag, &pfh, len, 0, hlimit, np->tclass, NULL, &fl6, rt, @@ -188,6 +189,7 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, (struct icmp6hdr *) &pfh.icmph, len); } + release_sock(sk); return err; }