Re: Shouldn't we be using alloc_skb/kfree_skb in net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl ?

From: Jesper Juhl
Date: Thu Jun 16 2005 - 18:07:03 EST

On 6/17/05, David S. Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Jesper Juhl <juhl-lkml@xxxxxx>
> 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@xxxxxxxxx>
Don't top-post
Plain text mails only, please
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at