[ 3.5.y.z extended stable ] Patch "aoe: reserve enough headroom on skbs" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Thu Apr 4 13:25:30 UTC 2013

This is a note to let you know that I have just added a patch titled

    aoe: reserve enough headroom on skbs

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



>From a2191bd16c90fb7dea63729457541f3539f3712f Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet at google.com>
Date: Wed, 27 Mar 2013 18:28:41 +0000
Subject: [PATCH] aoe: reserve enough headroom on skbs

commit 91c5746425aed8f7188a351f1224a26aa232e4b3 upstream.

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 at ll.mit.edu>
Tested-by: David Oostdyk <daveo at ll.mit.edu>
Signed-off-by: Eric Dumazet <edumazet at google.com>
Cc: Ed Cashin <ecashin at coraid.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 drivers/block/aoe/aoecmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 887f68f..db30542 100644
--- 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->protocol = __constant_htons(ETH_P_AOE);

More information about the kernel-team mailing list