netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: stefan@loplof.de
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] core: linkwatch should use jiffies64
Date: Sun, 07 May 2006 23:07:27 -0700 (PDT)	[thread overview]
Message-ID: <20060507.230727.67882043.davem@davemloft.net> (raw)
In-Reply-To: <200605071213.56877.stefan@loplof.de>

From: Stefan Rompf <stefan@loplof.de>
Date: Sun, 7 May 2006 12:13:56 +0200

> the linkwatch code can overflow on a jiffies wrap, scheduling
> work with a too large delay. If the delay is >0x80000000,
> internal_add_timer() seems to overflow too, hiding the bug, so
> this isn't triggered too easily.

What is so special about what linkwatch is doing such
that it needs this kind of treatment and other similar
pieces or code do not?

We have all sorts of interfaces such as time_after() et el.
in order to deal with wrapping issues.  And furthermore
using 64-bit jiffies here might not be appropriate because
they are not guarenteed to be accessed atomically, nothing
here prevents the upper 32-bits from being updated while
we sample the lower 32-bits on 32-bit systems that will do
the 64-bit jiffied load using two 32-bit loads.

  reply	other threads:[~2006-05-08  6:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-07 10:13 [PATCH] core: linkwatch should use jiffies64 Stefan Rompf
2006-05-08  6:07 ` David S. Miller [this message]
2006-05-08 18:28   ` Stefan Rompf
2006-05-09 11:26     ` [NET] linkwatch: Handle jiffies wrap-around Herbert Xu
2006-05-09 16:51       ` Stefan Rompf
2006-05-09 22:28         ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060507.230727.67882043.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@loplof.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).