lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Xen-devel] BUG in xennet_make_frags with paged skb data
From
Date
On Fri, 2014-11-07 at 09:25 +0000, Zoltan Kiss wrote:

Please do not top post.

> Hi,
>
> AFAIK in this scenario your skb frag is wrong. The page pointer should
> point to the original compound page (not a member of it), and offset
> should be set accordingly.
> For example, if your compound page is 16K (4 page), then the page
> pointer should point to the first page, and if the data starts at the
> 3rd page, then offset should be >8K

This is not accurate.

This BUG_ON() is wrong.

It should instead be :

BUG_ON(len + offset > PAGE_SIZE<<compound_order(compound_head(page)));

splice() code can generate such cases.




\
 
 \ /
  Last update: 2014-11-07 13:01    [W:2.701 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site