From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Xi Wang <xi.wang@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] netfilter: ctnetlink: fix timeout calculation
Date: Sat, 31 Dec 2011 16:58:12 +0100 [thread overview]
Message-ID: <20111231155812.GB17114@1984> (raw)
In-Reply-To: <1325259617-22034-1-git-send-email-xi.wang@gmail.com>
On Fri, Dec 30, 2011 at 10:40:17AM -0500, Xi Wang wrote:
> The sanity check (timeout < 0) never works; the dividend is unsigned
> and so is the division, which should have been a signed division.
>
> long timeout = (ct->timeout.expires - jiffies) / HZ;
> if (timeout < 0)
> timeout = 0;
>
> This patch converts the time values to signed for the division.
>
> Signed-off-by: Xi Wang <xi.wang@gmail.com>
Applied, thanks.
prev parent reply other threads:[~2011-12-31 15:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-30 15:40 [PATCH] netfilter: ctnetlink: fix timeout calculation Xi Wang
2011-12-31 15:58 ` Pablo Neira Ayuso [this message]
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=20111231155812.GB17114@1984 \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=xi.wang@gmail.com \
/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).