Skip to contentSkip to conversation

af_key: remove a duplicated skb_orphan()

PATCH Applied Cong Wang 2 participants 2 messages Jan 23, 2013 – Jan 28, 2013

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 af_key: remove a duplicated skb_orphan()

From: Cong Wang <[email protected]>

skb_set_owner_r() will call skb_orphan(), I don't see any reason to call it twice.

Cc Steffen Klassert <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>

---

net/key/af_key.c +0 -1
index 5b426a6..6a6e684 100644
@@ -203,7 +203,6 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
 	}
 	if (*skb2 != NULL) {
 		if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {
-			skb_orphan(*skb2);
 			skb_set_owner_r(*skb2, sk);
 			skb_queue_tail(&sk->sk_receive_queue, *skb2);
 			sk->sk_data_ready(sk, (*skb2)->len);