Skip to content

Commit 0aa2212

Browse files
Hoang Legregkh
authored andcommitted
Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv"
commit 7501689 upstream. This reverts commit 6bf24dc. Above fix is not correct and caused memory leak issue. Fixes: 6bf24dc ("net:tipc: Fix a double free in tipc_sk_mcast_rcv") Acked-by: Jon Maloy <jmaloy@redhat.com> Acked-by: Tung Nguyen <tung.q.nguyen@dektech.com.au> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5343fcf commit 0aa2212

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎net/tipc/socket.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,10 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
12441244
spin_lock_bh(&inputq->lock);
12451245
if (skb_peek(arrvq) == skb) {
12461246
skb_queue_splice_tail_init(&tmpq, inputq);
1247-
__skb_dequeue(arrvq);
1247+
/* Decrease the skb's refcnt as increasing in the
1248+
* function tipc_skb_peek
1249+
*/
1250+
kfree_skb(__skb_dequeue(arrvq));
12481251
}
12491252
spin_unlock_bh(&inputq->lock);
12501253
__skb_queue_purge(&tmpq);

0 commit comments

Comments
 (0)