netdev
[Top] [All Lists]

[PATCH][SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in s

To: davem@xxxxxxxxxxxxx
Subject: [PATCH][SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit().
From: Sridhar Samudrala <sri@xxxxxxxxxx>
Date: Fri, 22 Apr 2005 12:29:09 -0700 (PDT)
Cc: netdev@xxxxxxxxxxx, lksctp-developers@xxxxxxxxxxxxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Hi Dave,

Please apply to 2.6.

Thanks
Sridhar

===========================================================================
[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in
       sctp_packet_transmit().

Signed-off-by: Sridhar Samudrala <sri@xxxxxxxxxx>
===========================================================================
diff -Nru a/net/sctp/output.c b/net/sctp/output.c
--- a/net/sctp/output.c 2005-04-21 16:25:54 -07:00
+++ b/net/sctp/output.c 2005-04-21 16:25:54 -07:00
@@ -313,12 +313,12 @@
        sk = chunk->skb->sk;

        /* Allocate the new skb.  */
-       nskb = dev_alloc_skb(packet->size);
+       nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC);
        if (!nskb)
                goto nomem;

        /* Make sure the outbound skb has enough header room reserved. */
-       skb_reserve(nskb, packet->overhead);
+       skb_reserve(nskb, packet->overhead + LL_MAX_HEADER);

        /* Set the owning socket so that we know where to get the
         * destination IP address.

--

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH][SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit()., Sridhar Samudrala <=