netconsole-C2 skb checking
Subsystems (2)
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;