Commit:     db0ccffed91e234cad99a35f07d5a322f410baa2
Parent:     4cd8c9e87be7ea891050ff1bebbf767a837eb5cf
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 23:22:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu May 10 23:45:11 2007 -0700

    [NET] link_watch: Eliminate potential delay on wrap-around
    When the jiffies wrap around or when the system boots up for the first
    time, down events can be delayed indefinitely since we no longer
    update linkwatch_nextevent when only urgent events are processed.
    This patch fixes this by setting linkwatch_nextevent when a
    wrap-around occurs.
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/core/link_watch.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/core/link_watch.c b/net/core/link_watch.c
index b5f4579..4674ae5 100644
--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -101,8 +101,10 @@ static void linkwatch_schedule_work(unsigned long delay)
        /* If we wrap around we'll delay it by at most HZ. */
-       if (delay > HZ)
+       if (delay > HZ) {
+               linkwatch_nextevent = jiffies;
                delay = 0;
+       }
        schedule_delayed_work(&linkwatch_work, delay);
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

Reply via email to