[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111231155812.GB17114@1984>
Date: Sat, 31 Dec 2011 16:58:12 +0100
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Xi Wang <xi.wang@...il.com>
Cc: Patrick McHardy <kaber@...sh.net>,
"David S. Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netfilter: ctnetlink: fix timeout calculation
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@...il.com>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists