Thread (10 messages) 10 messages, 3 authors, 2006-08-02

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

From: David Miller <davem@davemloft.net>
Date: 2006-08-02 00:48:18

From: Krzysztof Halasa <khc@pm.waw.pl>
Date: Wed, 02 Aug 2006 02:42:05 +0200
Alexey Kuznetsov [off-list ref] writes:
quoted
Actually, it is historical hole in design, inherited from ancient
times. Calling conventions of dev->hard_header() just did not allow
to reallocate. BTW in 2.6 it can, if it uses pskb_expand_head().
Does that mean that hard_header() and then hard_start_xmit()
can use pskb_expand_head() instead of skb_realloc_headroom()
without restrictions?
It is definitely the case that ->hard_start_xmit() can use
pskb_expand_head(), some ethernet drivers even use it when they need
to clobber the IP and TCP headers to implement TSO and another entity
has a reference to the packet headers.  Just be sure to pass
GFP_ATOMIC to it in such a context.

One example is drivers/net/tg3.c:tg3_start_xmit().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help