[patch 09/25] netfilter: xt_time: fix times time_mt()s use ofdo_div()

From: Greg KH
Date: Mon Aug 04 2008 - 17:38:32 EST



2.6.26-stable review patch. If anyone has any objections, please let us
know.

------------------

From: David Howells <dhowells@xxxxxxxxxx>

[ Upstream commit 280763c053fee297d95b474f2c145990670371e6 ]

Fix netfilter xt_time's time_mt()'s use of do_div() on an s64 by using
div_s64() instead.

This was introduced by patch ee4411a1b1e0b679c99686629b5eab5a072ce49f
("[NETFILTER]: x_tables: add xt_time match").

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
CC: Oliver Pinter <oliver.pntr@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
net/netfilter/xt_time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -173,7 +173,7 @@ time_mt(const struct sk_buff *skb, const
__net_timestamp((struct sk_buff *)skb);

stamp = ktime_to_ns(skb->tstamp);
- do_div(stamp, NSEC_PER_SEC);
+ stamp = div_s64(stamp, NSEC_PER_SEC);

if (info->flags & XT_TIME_LOCAL_TZ)
/* Adjust for local timezone */

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/