Skip to contentSkip to conversation

netconsole-C2 skb checking

PATCH New Randy.Dunlap 1 participant 1 message Oct 1, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netconsole-C2 skb checking

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

drivers/net/netconsole.c renamed from drivers/net/netconsole.c.org +4 -3
@@ -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;