Re: [PATCH] ppp_generic causes skput:under: w/ pppoatm and vc-encaps

Michal Ostrowski (mostrows@speakeasy.net)
14 Nov 2001 09:23:53 -0500


If you set the hdrlen field of the ppp_channel that pppoatm registers
(pvcc->chan.hdrlen, in pppoatm_assign_vcc()) then ppp_generic will
always over-allocate skb space to allow for extra headers to be pushed
in. This mechanism was put is so that we wouldn't have to copy the
frame in order to slap on PPPoE headers onto it. I think it's a good
idea to be doing this, especially if you're going to play with
hard_header_len.

If you look at pppoatm_send(), you'll see that you do an
skb_realloc_headroom if there's no space for the headers. If
pvcc->chan.hdrlen is set properly then this will be the exceptional,
rather than the common case.

> Here is my "better fix". In pppoatm, we should be increasing the
> device header length appropriately. ie. dev->hard_header_len needs to
> be increased in the pppoatm driver when vc-encaps is used.
>
> Franks a lot,
> David S. Miller
> davem@redhat.com

-- 
Michal Ostrowski
mostrows@speakeasy.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/