From: roy.qing.li@gmail.com
To: netdev@vger.kernel.org
Subject: [PATCH net-next] skbuff: update sk truesize in pskb_expand_head
Date: Fri, 14 Oct 2011 15:39:30 +0800 [thread overview]
Message-ID: <1318577970-19566-1-git-send-email-roy.qing.li@gmail.com> (raw)
when pskb_expand_head reallocates header of &sk_buff, the sk
truesize should be updated simultaneously
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
net/core/skbuff.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 387703f..48e0be9 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -920,6 +920,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
}
off = (data + nhead) - skb->head;
+ skb->truesize += (size - (skb_end_pointer(skb) - skb->head));
skb->head = data;
adjust_others:
skb->data += off;
--
1.7.1
next reply other threads:[~2011-10-14 7:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 7:39 roy.qing.li [this message]
2011-10-14 7:48 ` [PATCH net-next] skbuff: update sk truesize in pskb_expand_head David Miller
2011-10-15 3:52 ` RongQing Li
2011-10-15 4:02 ` David Miller
2011-10-14 7:53 ` Eric Dumazet
2011-10-15 3:54 ` RongQing Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318577970-19566-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox