From: "David S. Miller" <davem@davemloft.net>
To: jesper.juhl@gmail.com, juhl-lkml@dif.dk
Cc: linux-kernel@vger.kernel.org, laforge@netfilter.org, sfrost@snowman.net
Subject: Re: Shouldn't we be using alloc_skb/kfree_skb in net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl ?
Date: Thu, 16 Jun 2005 15:48:38 -0700 (PDT) [thread overview]
Message-ID: <20050616.154838.41634341.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.62.0506170025140.2477@dragon.hyggekrogen.localhost>
From: Jesper Juhl <juhl-lkml@dif.dk>
Date: Fri, 17 Jun 2005 00:36:04 +0200 (CEST)
> I was just grep'ing through the source looking for places where skb's
> might be freed by plain kfree() and, amongst other things, I noticed
> net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl, where a struct sk_buff*
> is defined and then storage for it is allocated with kmalloc() and freed
> with kfree(), and I'm wondering if we shouldn't be using
> alloc_skb/kfree_skb instead (as pr the patch below)? Or is there some good
> reason for doing it the way it's currently done?
It's using it to send a dummy packet to the patch function.
It is gross, but it does work because it allocated it's own
private data area to skb->nh.iph.
Just leave it alone for now, ipt_recent is gross and full of many
errors and bug, and thus stands to have a rewrite. Patrick McHardy
said he will try to do that.
next prev parent reply other threads:[~2005-06-16 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-16 22:36 Jesper Juhl
2005-06-16 22:33 ` Stephen Frost
2005-06-16 22:48 ` David S. Miller [this message]
2005-06-16 22:53 ` Jesper Juhl
2005-06-17 2:31 ` Stephen Frost
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=20050616.154838.41634341.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jesper.juhl@gmail.com \
--cc=juhl-lkml@dif.dk \
--cc=laforge@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrost@snowman.net \
/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®