* [SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
@ 2007-04-08 1:47 Patrick McHardy
2007-04-09 18:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2007-04-08 1:47 UTC (permalink / raw)
To: David S. Miller; +Cc: Arnaldo Carvalho de Melo, Kernel Netdev Mailing List
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
These patches fix two crashes I was getting with net-2.6.22
on 64 bit caused by missing skb header offset adjustments
when changing the headroom length.
[-- Attachment #2: 01.diff --]
[-- Type: text/plain, Size: 1259 bytes --]
[SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
Since we're increasing the headroom, the header offsets need to be
increased by the same amount as well.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit fb98b03719ad23840ca005edbba3c86ef1e3282c
tree 25821494e6032e487f3d197fa1392206b0004583
parent 5899a39783bd49bd6b926eaeafc16c7276620f63
author Patrick McHardy <kaber@trash.net> Sun, 08 Apr 2007 03:17:49 +0200
committer Patrick McHardy <kaber@trash.net> Sun, 08 Apr 2007 03:17:49 +0200
net/core/skbuff.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index e60864e..5c9ee94 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -725,14 +725,15 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
skb->data += off;
#ifdef NET_SKBUFF_DATA_USES_OFFSET
skb->end = size;
+ off = nhead;
#else
skb->end = skb->head + size;
+#endif
/* {transport,network,mac}_header and tail are relative to skb->head */
skb->tail += off;
skb->transport_header += off;
skb->network_header += off;
skb->mac_header += off;
-#endif
skb->cloned = 0;
skb->nohdr = 0;
atomic_set(&skb_shinfo(skb)->dataref, 1);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
2007-04-08 1:47 [SK_BUFF]: Fix missing offset adjustment in pskb_expand_head Patrick McHardy
@ 2007-04-09 18:45 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-04-09 18:45 UTC (permalink / raw)
To: kaber; +Cc: acme, netdev
From: Patrick McHardy <kaber@trash.net>
Date: Sun, 08 Apr 2007 03:47:39 +0200
> These patches fix two crashes I was getting with net-2.6.22
> on 64 bit caused by missing skb header offset adjustments
> when changing the headroom length.
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-09 18:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-08 1:47 [SK_BUFF]: Fix missing offset adjustment in pskb_expand_head Patrick McHardy
2007-04-09 18:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).