From: Ben Hutchings <ben@decadent.org.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, ying.xue@windriver.com,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.3] tipc: Fix kfree_skb() of uninitialised pointer
Date: Tue, 15 Dec 2015 21:21:57 +0000 [thread overview]
Message-ID: <20151215212156.GQ28542@decadent.org.uk> (raw)
[-- 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 --]
next reply other threads:[~2015-12-15 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 21:21 Ben Hutchings [this message]
2015-12-17 22:43 ` Patch "tipc: Fix kfree_skb() of uninitialised pointer" has been added to the 4.3-stable tree gregkh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151215212156.GQ28542@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.