Patch "aoe: reserve enough headroom on skbs" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    aoe: reserve enough headroom on skbs

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:
     aoe-reserve-enough-headroom-on-skbs.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 <stable@xxxxxxxxxxxxxxx> know about it.


>From b8b0b3cb0166b703a19b509c1466a5ab4cb498c5 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@xxxxxxxxxx>
Date: Wed, 27 Mar 2013 18:28:41 +0000
Subject: aoe: reserve enough headroom on skbs


From: Eric Dumazet <edumazet@xxxxxxxxxx>

[ Upstream commit 91c5746425aed8f7188a351f1224a26aa232e4b3 ]

Some network drivers use a non default hard_header_len

Transmitted skb should take into account dev->hard_header_len, or risk
crashes or expensive reallocations.

In the case of aoe, lets reserve MAX_HEADER bytes.

David reported a crash in defxx driver, solved by this patch.

Reported-by: David Oostdyk <daveo@xxxxxxxxxx>
Tested-by: David Oostdyk <daveo@xxxxxxxxxx>
Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
Cc: Ed Cashin <ecashin@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/block/aoe/aoecmd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -30,8 +30,9 @@ new_skb(ulong len)
 {
 	struct sk_buff *skb;
 
-	skb = alloc_skb(len, GFP_ATOMIC);
+	skb = alloc_skb(len + MAX_HEADER, GFP_ATOMIC);
 	if (skb) {
+		skb_reserve(skb, MAX_HEADER);
 		skb_reset_mac_header(skb);
 		skb_reset_network_header(skb);
 		skb->protocol = __constant_htons(ETH_P_AOE);


Patches currently in stable-queue which might be from edumazet@xxxxxxxxxx are

queue-3.4/8021q-fix-a-potential-use-after-free.patch
queue-3.4/tcp-preserve-ack-clocking-in-tso.patch
queue-3.4/drivers-net-ethernet-cpsw-use-netif_wake_queue-while-restarting-tx-queue.patch
queue-3.4/aoe-reserve-enough-headroom-on-skbs.patch
queue-3.4/net-remove-a-warn_on-in-net_enable_timestamp.patch
queue-3.4/net-add-a-synchronize_net-in-netdev_rx_handler_unregister.patch
queue-3.4/net-fix-_diag_max-constants.patch
queue-3.4/af_unix-dont-send-scm_credential-when-dest-socket-is-null.patch
queue-3.4/drivers-net-ethernet-davinci_emac-use-netif_wake_queue-while-restarting-tx-queue.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]