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

    gianfar: fix potential sk_wmem_alloc imbalance

to the 3.4-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:
     gianfar-fix-potential-sk_wmem_alloc-imbalance.patch
and it can be found in the queue-3.4 subdirectory.

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


>From a80e8d2e59d8ffa5d559c7e37005180f425095ea Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Thu, 5 Jul 2012 11:45:13 +0000
Subject: gianfar: fix potential sk_wmem_alloc imbalance


From: Eric Dumazet <[email protected]>

[ Upstream commit 313b037cf054ec908de92fb4c085403ffd7420d4 ]

commit db83d136d7f753 (gianfar: Fix missing sock reference when
processing TX time stamps) added a potential sk_wmem_alloc imbalance

If the new skb has a different truesize than old one, we can get a
negative sk_wmem_alloc once new skb is orphaned at TX completion.

Now we no longer early orphan skbs in dev_hard_start_xmit(), this
probably can lead to fatal bugs.

Signed-off-by: Eric Dumazet <[email protected]>
Tested-by: Paul Gortmaker <[email protected]>
Cc: Manfred Rudigier <[email protected]>
Cc: Claudiu Manoil <[email protected]>
Cc: Jiajun Wu <[email protected]>
Cc: Andy Fleming <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/ethernet/freescale/gianfar.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2065,10 +2065,9 @@ static int gfar_start_xmit(struct sk_buf
                        return NETDEV_TX_OK;
                }
 
-               /* Steal sock reference for processing TX time stamps */
-               swap(skb_new->sk, skb->sk);
-               swap(skb_new->destructor, skb->destructor);
-               kfree_skb(skb);
+               if (skb->sk)
+                       skb_set_owner_w(skb_new, skb->sk);
+               consume_skb(skb);
                skb = skb_new;
        }
 


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

queue-3.4/sch_sfb-fix-missing-null-check.patch
queue-3.4/gianfar-fix-potential-sk_wmem_alloc-imbalance.patch
queue-3.4/netem-add-limitation-to-reordered-packets.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