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

Commit 0f506f92 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ping: Fix race in free in receive path"

parents dd793d32 8bca6133
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -964,8 +964,11 @@ void ping_rcv(struct sk_buff *skb)

	sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id));
	if (sk != NULL) {
		struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);

		pr_debug("rcv on socket %p\n", sk);
		ping_queue_rcv_skb(sk, skb_get(skb));
		if (skb2)
			ping_queue_rcv_skb(sk, skb2);
		sock_put(sk);
		return;
	}