LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH]tcpsp-0.0.2 segmentation fault when rmmod

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH]tcpsp-0.0.2 segmentation fault when rmmod
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Sat, 25 Oct 2003 11:28:25 -0700
yangrunhua wrote:

--- tcpsp-0.0.2/tcpsp_conn.c    2002-05-20 12:20:31.000000000 +0800
+++ tcpspnew/tcpsp_conn.c       2003-10-24 23:22:46.000000000 +0800
@@ -603,7 +603,7 @@
{
       int idx;
       struct tcpsp_conn *cp;
-       struct list_head *l,*e;
+       struct list_head *l,*e,*enext;

 flush_again:
       for (idx=0; idx<TCPSP_CONN_TAB_SIZE; idx++) {
@@ -613,8 +613,9 @@
               write_lock(&tcpsp_conn_lock);

               l = &tcpsp_conn_tab1[idx];
-               for (e=l->next; e!=l; e=e->next) {
+               for (e=l->next; e!=l; e=enext) {
                       cp = list_entry(e, struct tcpsp_conn, f_list);

      list_for_each_safe(e, enext, &scpsp_conn_tab1[idx])

If you are using the list_head stuff please use the iterators...

<Prev in Thread] Current Thread [Next in Thread>