From: Jesper Juhl <jesper.juhl@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: juhl-lkml@dif.dk, 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: Fri, 17 Jun 2005 00:53:23 +0200 [thread overview]
Message-ID: <9a8748490506161553409d2851@mail.gmail.com> (raw)
In-Reply-To: <20050616.154838.41634341.davem@davemloft.net>
On 6/17/05, David S. Miller <davem@davemloft.net> wrote:
> 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.
>
Ok. I was just about to send the patch off to Andrew based on
Stephen's reply, but I'll hold off on that then.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
next prev parent reply other threads:[~2005-06-16 22:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-16 22:36 Shouldn't we be using alloc_skb/kfree_skb in net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl ? Jesper Juhl
2005-06-16 22:33 ` Stephen Frost
2005-06-16 22:48 ` David S. Miller
2005-06-16 22:53 ` Jesper Juhl [this message]
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=9a8748490506161553409d2851@mail.gmail.com \
--to=jesper.juhl@gmail.com \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).