All of lore.kernel.org
 help / color / mirror / Atom feed
* [net] Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv"
@ 2021-05-14  1:23 Hoang Le
  2021-05-14 22:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Hoang Le @ 2021-05-14  1:23 UTC (permalink / raw)
  To: jmaloy, maloy, ying.xue, kuba, davem, netdev, tipc-discussion; +Cc: Tung Nguyen

This reverts commit 6bf24dc0cc0cc43b29ba344b66d78590e687e046.
Above fix is not correct and caused memory leak issue.

Fixes: 6bf24dc0cc0c ("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>
---
 net/tipc/socket.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 58935cd0d068..53af72824c9c 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1262,7 +1262,10 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
 		spin_lock_bh(&inputq->lock);
 		if (skb_peek(arrvq) == skb) {
 			skb_queue_splice_tail_init(&tmpq, inputq);
-			__skb_dequeue(arrvq);
+			/* Decrease the skb's refcnt as increasing in the
+			 * function tipc_skb_peek
+			 */
+			kfree_skb(__skb_dequeue(arrvq));
 		}
 		spin_unlock_bh(&inputq->lock);
 		__skb_queue_purge(&tmpq);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net] Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv"
  2021-05-14  1:23 [net] Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv" Hoang Le
@ 2021-05-14 22:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-14 22:10 UTC (permalink / raw)
  To: Hoang Le
  Cc: jmaloy, maloy, ying.xue, kuba, davem, netdev, tipc-discussion,
	tung.q.nguyen

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 14 May 2021 08:23:03 +0700 you wrote:
> This reverts commit 6bf24dc0cc0cc43b29ba344b66d78590e687e046.
> Above fix is not correct and caused memory leak issue.
> 
> Fixes: 6bf24dc0cc0c ("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>
> 
> [...]

Here is the summary with links:
  - [net] Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv"
    https://git.kernel.org/netdev/net/c/75016891357a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-14 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-14  1:23 [net] Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv" Hoang Le
2021-05-14 22:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.