Re: [PATCH] NET: fix kernel panic from no dev->hard_header_len space

David Miller
2006-07-31T20:23:26Z

From: Krzysztof Halasa <khc@pm.waw.pl>
Date: Mon, 31 Jul 2006 22:04:33 +0200

> Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> writes:
>
> > All the rest of places just check, that there is enough space
> > for their immediate needs. If dev->hard_header() is NULL, it means that
> > stack does not need any space at all, so that it does not need to worry.
>
> Why do you think dev->hard_header == NULL means there is no need for
> header space? Isn't it dev->hard_header_len = 0? Why would a device
> set hard_header_len to non-zero if it doesn't need header space?

If you have headers to prepend for your device, why do you set the
header building function to NULL? :-)