Re: build bug on kfree(struct sk_buff*)

From: Ben Hutchings
Date: Sun Mar 15 2009 - 15:39:31 EST


On Sun, 2009-03-15 at 17:42 +0100, Roel Kluin wrote:
> I noticed that my initial attempt was invalid. The one below appears to be
> correct, although I am not sure whether there is a better implementation.
>
> this patch also fixes a kfree(skb) in net/core/dev.c, what do you think?
[...]

There are many types that should not be allocated and freed using the
general-purpose heap functions. Why provide this check only for struct
skbuff?

Perhaps you should try to find a general way of detecting this, such as
a type annotation for sparse.

Ben.

--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/