diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2013-07-04 00:52:49 +0900 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-11-20 17:16:27 +0100 |
commit | 0481a7db0a6f2718d34784d0e45442def0f1312c (patch) | |
tree | c7581f3eb80b08807cd161fd18b688c80a9012a5 /net/ipv6 | |
parent | cf4aecf04bb8a9db3cd240457c37f8cfe0970ef1 (diff) | |
download | kernel_samsung_tuna-0481a7db0a6f2718d34784d0e45442def0f1312c.zip kernel_samsung_tuna-0481a7db0a6f2718d34784d0e45442def0f1312c.tar.gz kernel_samsung_tuna-0481a7db0a6f2718d34784d0e45442def0f1312c.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/ipv6')
-rw-r--r-- | net/ipv6/ping.c | 2 |
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; } |