This is a note to let you know that I've just added the patch titled

    Bluetooth: 6lowpan: fix skb_unshare behaviour

to the 3.18-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bluetooth-6lowpan-fix-skb_unshare-behaviour.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From b0c42cd7b210efc74aa4bfc3e39a2814dfaa9b89 Mon Sep 17 00:00:00 2001
From: Alexander Aring <[email protected]>
Date: Wed, 8 Oct 2014 10:24:53 +0200
Subject: Bluetooth: 6lowpan: fix skb_unshare behaviour

From: Alexander Aring <[email protected]>

commit b0c42cd7b210efc74aa4bfc3e39a2814dfaa9b89 upstream.

This patch reverts commit:

a7807d73 ("Bluetooth: 6lowpan: Avoid memory leak if memory allocation
fails")

which was wrong suggested by Alexander Aring. The function skb_unshare
run also kfree_skb on failure.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 net/bluetooth/6lowpan.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -591,17 +591,13 @@ static netdev_tx_t bt_xmit(struct sk_buf
        int err = 0;
        bdaddr_t addr;
        u8 addr_type;
-       struct sk_buff *tmpskb;
 
        /* We must take a copy of the skb before we modify/replace the ipv6
         * header as the header could be used elsewhere
         */
-       tmpskb = skb_unshare(skb, GFP_ATOMIC);
-       if (!tmpskb) {
-               kfree_skb(skb);
+       skb = skb_unshare(skb, GFP_ATOMIC);
+       if (!skb)
                return NET_XMIT_DROP;
-       }
-       skb = tmpskb;
 
        /* Return values from setup_header()
         *  <0 - error, packet is dropped


Patches currently in stable-queue which might be from [email protected] are

queue-3.18/bluetooth-6lowpan-fix-skb_unshare-behaviour.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to