Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b25d30bf112370a12d05c3c0fd43732985dab01
Commit:     6b25d30bf112370a12d05c3c0fd43732985dab01
Parent:     1498b3f1952ae539a7d5c356acf942d5f4c1aece
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 15:30:19 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 22:19:03 2007 -0700

    [NET]: Fix gen_estimator timer removal race
    
    As noticed by Jarek Poplawski <[EMAIL PROTECTED]>, the timer removal in
    gen_kill_estimator races with the timer function rearming the timer.
    
    Check whether the timer list is empty before rearming the timer
    in the timer function to fix this.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Acked-by: Jarek Poplawski <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/gen_estimator.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 17daf4c..cc84d8d 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -128,7 +128,8 @@ static void est_timer(unsigned long arg)
                spin_unlock(e->stats_lock);
        }
 
-       mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
+       if (elist[idx].list != NULL)
+               mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
        read_unlock(&est_lock);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-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