* NULL pointer bug in netpoll.c
@ 2005-03-19 20:51 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2005-03-19 20:51 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
Hi,
it seems that there is a gremlin sleeping in
net/core/netpoll.c:find_skb(). Even if no more buffers are available
through "skbs", "skb" is dereferenced anyway. The tiny patch should fix it.
Jan
[-- Attachment #2: netpoll.patch --]
[-- Type: text/plain, Size: 438 bytes --]
--- linux-2.6.11.4/net/core/netpoll.c.orig 2005-03-16 01:09:19.000000000 +0100
+++ linux-2.6.11.4/net/core/netpoll.c 2005-03-19 21:42:41.573018776 +0100
@@ -165,10 +165,11 @@ repeat:
if (!skb) {
spin_lock_irqsave(&skb_list_lock, flags);
skb = skbs;
- if (skb)
+ if (skb) {
skbs = skb->next;
- skb->next = NULL;
- nr_skbs--;
+ skb->next = NULL;
+ nr_skbs--;
+ }
spin_unlock_irqrestore(&skb_list_lock, flags);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-19 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 20:51 NULL pointer bug in netpoll.c Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox