Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d655fb0 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Subash Abhinov Kasiviswanathan
Browse files

net: ipv6: add missing lock in ping_v6_sendmsg



CRs-Fixed: 573548
Change-Id: I5e9db559d22e35d27fa1df948b70c70ed8b42115
Signed-off-by: default avatarLorenzo Colitti <lorenzo@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: a1bdc45580fc19e968b32ad27cd7e476a4aa58f6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 4c69db7c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}