netdev
[Top] [All Lists]

[PATCH 2.5.72] (2/3) PPPoE fix oops on /proc/net/pppoe

To: netdev@xxxxxxxxxxx
Subject: [PATCH 2.5.72] (2/3) PPPoE fix oops on /proc/net/pppoe
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Fri, 20 Jun 2003 17:33:24 -0700
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
Reading /proc/net/pppoe will OOPs because it calls hash_item() when the object 
pointer (po)
is null.

diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c
--- a/drivers/net/pppoe.c       Fri Jun 20 17:16:43 2003
+++ b/drivers/net/pppoe.c       Fri Jun 20 17:16:43 2003
@@ -1015,8 +1015,9 @@
                goto out;
        }
        po = v;
-       po = po->next;
-       if (!po) {
+       if (po->next) 
+               po = po->next;
+       else {
                int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote);
 
                while (++hash < PPPOE_HASH_SIZE) {

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 2.5.72] (2/3) PPPoE fix oops on /proc/net/pppoe, Stephen Hemminger <=