netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ipv6: add missing lock in ping_v6_sendmsg
@ 2013-07-03 15:52 Lorenzo Colitti
  2013-07-04  0:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Colitti @ 2013-07-03 15:52 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Eric Dumazet, lorenzo

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
---
 net/ipv6/ping.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 2b52046..10b9755 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;
 }
-- 
1.8.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ipv6: add missing lock in ping_v6_sendmsg
  2013-07-03 15:52 [PATCH] net: ipv6: add missing lock in ping_v6_sendmsg Lorenzo Colitti
@ 2013-07-04  0:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-04  0:42 UTC (permalink / raw)
  To: lorenzo; +Cc: netdev, edumazet

From: Lorenzo Colitti <lorenzo@google.com>
Date: Thu,  4 Jul 2013 00:52:49 +0900

> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-04  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 15:52 [PATCH] net: ipv6: add missing lock in ping_v6_sendmsg Lorenzo Colitti
2013-07-04  0:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).