Thread (31 messages) flat view 31 messages, 4 authors, 2011-11-18

Re: PROBLEM: System call 'sendmsg' of process ospfd (quagga) causes kernel oops

From: Eric Dumazet <hidden>
Date: 2011-10-19 07:18:41
Also in: lkml

Le mercredi 19 octobre 2011 à 03:09 -0400, David Miller a écrit :
From: Herbert Xu <redacted>
Date: Tue, 18 Oct 2011 15:45:37 +0200
quoted
On Tue, Oct 18, 2011 at 02:56:00PM +0200, Eric Dumazet wrote:
quoted
I am ok by this way, but we might hit another similar problem elsewhere.

(igmp.c ip6_output, ...)

We effectively want to remove LL_ALLOCATED_SPACE() usage and obfuscate
code...
Here's another idea, provide a helper to do the skb allocation
and the skb_reserve in one go.  That way this ugliness would only
need to be done once.
Someone please test this:

--------------------
net: Fix crashes on devices which dynamically change needed headroom.

One such device is IP_GRE.

The problem is that we evaluate the device characteristics twice, once
to determine the allocation size, and once to do the skb_reserve().

Combine these into one operation using a helper function.

With help from Eric Dumazet and Herbert Xu.

Reported-by: Reported-by: Elmar Vonlanthen <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>


Seems fine (Maybe do the +15 in caller site ?), but we also have other
problematic cases, using alloc_skb() only...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help