Re: 2.3.43: Warning: kfree_skb on hard IRQ

From: David S. Miller (davem@redhat.com)
Date: Thu Feb 10 2000 - 21:19:27 EST


   Date: Thu, 10 Feb 2000 23:55:06 +0100 (CET)
   From: Jorgen Skjaanes <js@pimp.gulesider.no>

   Got a few of these when the eth-card was initialised during boot:

   Warning: kfree_skb on hard IRQ c01b6408

One must use dev_kfree_skb_irq() when in hw IRQ context, not
plain dev_kfree_skb(). Here is the fix, I'll be sending this
off to Linus:

--- drivers/net/tlan.c.~1~ Thu Feb 10 16:24:44 2000
+++ drivers/net/tlan.c Thu Feb 10 18:19:14 2000
@@ -1033,7 +1033,7 @@
         head_list = priv->txList + priv->txHead;
 
         if ( ! bbuf ) {
- dev_kfree_skb( (struct sk_buff *) head_list->buffer[9].address );
+ dev_kfree_skb_irq( (struct sk_buff *) head_list->buffer[9].address );
                 head_list->buffer[9].address = 0;
         }
 
@@ -1614,7 +1614,10 @@
                         list = priv->txList + i;
                         skb = (struct sk_buff *) list->buffer[9].address;
                         if ( skb ) {
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq( skb );
+ else
+ dev_kfree_skb( skb );
                                 list->buffer[9].address = 0;
                         }
                 }
@@ -1623,7 +1626,10 @@
                         list = priv->rxList + i;
                         skb = (struct sk_buff *) list->buffer[9].address;
                         if ( skb ) {
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq( skb );
+ else
+ dev_kfree_skb( skb );
                                 list->buffer[9].address = 0;
                         }
                 }

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:19 EST