diff options
Diffstat (limited to 'net/ipv6/ping.c')
-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 2ca215eb5f80..1584d47a2d3d 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -198,6 +198,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, @@ -212,6 +213,7 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, (struct icmp6hdr *) &pfh.icmph, len); } + release_sock(sk); return err; } |