netdev
[Top] [All Lists]

Re: BUG: 2.3.35 SMP tcpdump crash

To: kuznet@xxxxxxxxxxxxx
Subject: Re: BUG: 2.3.35 SMP tcpdump crash
From: Rusty Russell <rusty@xxxxxxxxxxxxxxxx>
Date: Fri, 31 Dec 1999 15:04:46 +1100
Cc: netdev@xxxxxxxxxxx
In-reply-to: Your message of "Thu, 30 Dec 1999 20:14:31 +0300." <199912301714.UAA10334@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
In message <199912301714.UAA10334@xxxxxxxxxxxxx> you write:
> Look at new skb_expand etc., backing out this fixes the problem.

Thanks.  Looks like someone is doing what I never expected: calling
skb_realloc_headroom() to get *less* headroom (from 32 down to 16).
This fixes it; now I'm looking to see who's doing that.

Sorry for the delay: urgent coffee machine repairs got priority.

Rusty.
--- linux-2.3-official/net/core/skbuff.c        Wed Dec 29 23:19:30 1999
+++ linux-2.3/net/core/skbuff.c Fri Dec 31 14:55:10 1999
@@ -358,8 +534,9 @@
 
        /* Set the tail pointer and length */
        skb_put(n,skb->len);
-       /* Copy the bytes: data pointers must point to same data. */
-       memcpy(n->data - skb_headroom(skb), skb->head, skb->end-skb->head);
+
+       /* Copy the data only. */
+       memcpy(n->data, skb->data, skb->len);
 
        copy_skb_header(n, skb);
        return n;
--
Hacking time.

<Prev in Thread] Current Thread [Next in Thread>