From: Li RongQing <redacted>
Ensure that frags and frags_list of dst skb are empty if need to call
skb_copy_bits, or else it will break the data sequence.
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <redacted>
---
net/core/skbuff.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
From: Eric Dumazet <hidden> Date: 2012-09-20 05:20:22
On Thu, 2012-09-20 at 11:19 +0800, roy.qing.li@gmail.com wrote:
quoted hunk
From: Li RongQing <redacted>
Ensure that frags and frags_list of dst skb are empty if need to call
skb_copy_bits, or else it will break the data sequence.
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <redacted>
---
net/core/skbuff.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
From: RongQing Li <hidden> Date: 2012-09-20 05:40:20
quoted
unsigned int offset;
This is not needed at all.
I think the below modification maybe needed,
if (len <= skb_tailroom(to) && !skb_shinfo(to)->nr_frags) {
..
}
First skb A is added to skb TO frags, since the len is larger
than skb_tailroot(TO), but second len of skb B is less than
skb_tailroot(To) which will call skb_copy_bits.
Of cause, this kinds of cases maybe only exist on my mind.
-Roy
From: Eric Dumazet <hidden> Date: 2012-09-20 05:54:08
On Thu, 2012-09-20 at 13:40 +0800, RongQing Li wrote:
quoted
quoted
unsigned int offset;
This is not needed at all.
I think the below modification maybe needed,
if (len <= skb_tailroom(to) && !skb_shinfo(to)->nr_frags) {
..
}
First skb A is added to skb TO frags, since the len is larger
than skb_tailroot(TO), but second len of skb B is less than
skb_tailroot(To) which will call skb_copy_bits.
Of cause, this kinds of cases maybe only exist on my mind.
Did you read skb_tailroom(to) definition by any chance ?
static inline int skb_tailroom(const struct sk_buff *skb)
{
return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
}
Current code is fine, because if @to is linear, its ... linear.
From: RongQing Li <hidden> Date: 2012-09-20 05:57:01
Did you read skb_tailroom(to) definition by any chance ?
static inline int skb_tailroom(const struct sk_buff *skb)
{
return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
}
Current code is fine, because if @to is linear, its ... linear.