mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Imran.Patel@nokia.com
Cc: netfilter-devel@us5.samba.org, netdev@oss.sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: skb allocation problems
Date: Tue, 10 Apr 2001 08:07:13 +0200	[thread overview]
Message-ID: <20010410080713.B9549@gruyere.muc.suse.de> (raw)
In-Reply-To: <2D6CADE9B0C6D411A27500508BB3CBD063CF07@eseis15nok>
In-Reply-To: <2D6CADE9B0C6D411A27500508BB3CBD063CF07@eseis15nok>; from Imran.Patel@nokia.com on Mon, Apr 09, 2001 at 07:03:46PM +0300

On Mon, Apr 09, 2001 at 07:03:46PM +0300, Imran.Patel@nokia.com 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) 


-Andi

  reply	other threads:[~2001-04-10  6:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-09 16:03 Imran.Patel
2001-04-10  6:07 ` Andi Kleen [this message]
2001-04-10 16:27 Imran.Patel
2001-04-10 17:23 ` Andi Kleen

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=20010410080713.B9549@gruyere.muc.suse.de \
    --to=ak@suse.de \
    --cc=Imran.Patel@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=netfilter-devel@us5.samba.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

all inboxes | Powered by JetHome®