aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-07-04 00:52:49 +0900
committerZiyan <jaraidaniel@gmail.com>2016-03-11 15:57:01 +0100
commit8631edfba577d72ff1c38398115239d6718490b9 (patch)
treea12eea25548d6532a852d8296ff6fc52a2264941 /net
parentc09a4ecfb388f4c783e343cd1c6aad59bdba7a60 (diff)
downloadkernel_samsung_espresso10-8631edfba577d72ff1c38398115239d6718490b9.zip
kernel_samsung_espresso10-8631edfba577d72ff1c38398115239d6718490b9.tar.gz
kernel_samsung_espresso10-8631edfba577d72ff1c38398115239d6718490b9.tar.bz2
net: ipv6: add missing lock in ping_v6_sendmsg
[net-next commit a1bdc45580fc19e968b32ad27cd7e476a4aa58f6] Bug: 9469865 Change-Id: I480f8ce95956dd8f17fbbb26dc60cc162f8ec933 Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ping.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 6472aca..c0f329b 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -193,6 +193,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,
@@ -207,6 +208,7 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
(struct icmp6hdr *) &pfh.icmph,
len);
}
+ release_sock(sk);
return err;
}