[patch] netconsole-C2 skb checking

From: Randy.Dunlap (rddunlap@osdlab.org)
Date: Mon Oct 01 2001 - 09:48:38 EST


Hi Ingo,

This small patch handles skb allocation a bit
more cleanly.

I didn't see that anyone else had already seen this.
Please apply/use.

~Randy

--- linux/drivers/net/netconsole.c.org Fri Sep 28 17:46:24 2001
+++ linux/drivers/net/netconsole.c Mon Oct 1 07:43:31 2001
@@ -96,10 +96,11 @@
 
         spin_lock_irqsave(&netconsole_lock, flags);
         skb = netconsole_skbs;
- if (skb)
+ if (skb) {
                 netconsole_skbs = skb->next;
- skb->next = NULL;
- nr_netconsole_skbs--;
+ skb->next = NULL;
+ nr_netconsole_skbs--;
+ }
         spin_unlock_irqrestore(&netconsole_lock, flags);
 
         return skb;

-
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/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:15 EST