ChangeSet 1.2181.41.1, 2005/03/30 16:32:22-08:00, [EMAIL PROTECTED]

        [NET]: NULL pointer bug in netpoll.c
        
        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.
        
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: David S. Miller <[EMAIL PROTECTED]>



 netpoll.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c
--- a/net/core/netpoll.c        2005-03-30 20:06:25 -08:00
+++ b/net/core/netpoll.c        2005-03-30 20:06:25 -08:00
@@ -219,10 +219,11 @@
        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);
        }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to