tipc: fix a double kfree_skb()
Subsystems (3)
PATCH 1/1 tipc: fix a double kfree_skb()
tipc_udp_xmit() drops the packet on error, there is no need to drop it again.
--- net/tipc/udp_media.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/tipc/udp_media.c +1 -3
@@ -245,10 +245,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb, } err =tipc_udp_xmit (net, _skb, ub, src, &rcast->addr); -if (err) { -kfree_skb (_skb); +if (err) goto out; - } } err =0 ; out:
Signature · 1 line
2.19.2
Acked.
Thank you for both your quick fixes, Cong.
///jon
Quoted 39 lines
-----Original Message-----
From: Cong Wang <[email protected]>
Sent: 10-Dec-18 15:46
To: [email protected]
Cc: Cong Wang <[email protected]>; Ying Xue <[email protected]>; Jon Maloy <[email protected]>
Subject: [Patch net] tipc: fix a doublekfree_skb()
tipc_udp_xmit()drops the packet on error, there is no need to drop it again.Fixes ef20cd4dd163 ("tipc: introduce UDP replicast")Reported-and-tested-by:
[email protected]Cc Ying Xue <[email protected]>Cc Jon Maloy <[email protected]>Signed-off-by Cong Wang <[email protected]>--- net/tipc/udp_media.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)net/tipc/udp_media.c index renamed from net/tipc/udp_media.c +0
-0
10dc59ce9c82..1b1ba1310ea7100644net/tipc/udp_media.c +1
-3@@ -245,10 +245,8 @@ static int tipc_udp_send_msg(struct net *net, structsk_buff *skb, } err =tipc_udp_xmit (net, _skb, ub, src, &rcast->addr); -if (err) { -kfree_skb (_skb); +if (err) goto out; - } } err =0 ;out:
--
2.19.2
David Miller
maintainerFrom: Cong Wang <[email protected]>
Date: Mon, 10 Dec 2018 12:45:45 -0800
Quoted 8 lines
tipc_udp_xmit()drops the packet on error, there is no need to drop it again.Fixes ef20cd4dd163 ("tipc: introduce UDP replicast")Reported-and-tested-by [email protected]Cc Ying Xue <[email protected]>Cc Jon Maloy <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied and queued up for -stable, thanks Cong.