[lkml]   [2001]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: skb allocation problems
On Mon, Apr 09, 2001 at 07:03:46PM +0300, wrote:
> I have written a test module which closely mirrors what my code tries to
> do(attached below). This is what i get:
> PRE_R: old skb:c371ee40 new skb:c371ee30

I guess oldskb->len is <=0xc, and the slab allocator packs them near together
in the same zone.

> printk("\nPRE_R: old skb:%p", (*pskb)->data);
> /* translation happens in the real code here */
> skb = alloc_skb((*pskb)->len, GFP_ATOMIC);
> if(!skb)
> printk("alloc failed");

I guess you want a return here.

> skb_reserve(skb, 16);

You cannot do that if you didn't make sure that the old skb had enough
room for it (or rather it'll sometimes panic)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.033 / U:3.352 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site