af_key: remove a duplicated skb_orphan()
Subsystems (3)
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]>
Signed-off-by Cong Wang <[email protected]>
---
net/key/af_key.c +0 -1
@@ -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);
Quoted 10 lines · Cong Wang
From: Cong Wang <[email protected]>
skb_set_owner_r()will callskb_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]>Signed-off-by Cong Wang <[email protected]>
Applied to ipsec-next, thanks!