All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.3] tipc: Fix kfree_skb() of uninitialised pointer
@ 2015-12-15 21:21 Ben Hutchings
  2015-12-17 22:43 ` Patch "tipc: Fix kfree_skb() of uninitialised pointer" has been added to the 4.3-stable tree gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2015-12-15 21:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable, ying.xue, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

Commit 7098356baca7 ("tipc: fix error handling of expanding buffer
headroom") added a "goto tx_error".  This is fine upstream, but
when backported to 4.3 it results in attempting to free the clone
before it has been allocated.  In this early error case, no
cleanup is needed.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 net/tipc/udp_media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 86f2e7c..73bdf1b 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -162,7 +162,7 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
 	if (skb_headroom(skb) < UDP_MIN_HEADROOM) {
 		err = pskb_expand_head(skb, UDP_MIN_HEADROOM, 0, GFP_ATOMIC);
 		if (err)
-			goto tx_error;
+			return err;
 	}
 
 	clone = skb_clone(skb, GFP_ATOMIC);

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

end of thread, other threads:[~2015-12-17 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15 21:21 [PATCH 4.3] tipc: Fix kfree_skb() of uninitialised pointer Ben Hutchings
2015-12-17 22:43 ` Patch "tipc: Fix kfree_skb() of uninitialised pointer" has been added to the 4.3-stable tree gregkh

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.