Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2802

kernel-2.6.18-238.el5.src.rpm

From: Jiri Pirko <jpirko@redhat.com>
Date: Thu, 14 Aug 2008 11:58:34 +0200
Subject:  [net] ipv6: use timer pending to fix bridge ref count
Message-id: 20080814115834.3e8abe7a@psychotron.englab.brq.redhat.com
O-Subject: [RHEL5.3 patch] BZ457006 ipv6: use timer pending to fix bridge reference count problem [rhel-5.3]
Bugzilla: 457006
RH-Acked-by: David S. Miller <davem@redhat.com>
RH-Acked-by: Neil Horman <nhorman@redhat.com>
RH-Acked-by: Thomas Graf <tgraf@redhat.com>

BZ457006

Description:
Using expires field instead of timer_pending() may cause bridge
reference count problem in the ipv6 FIB timer management.

Upstream status:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=847499ce71bdcc8fc542062df6ebed3e596608dd

Brew build:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1428944

Test status:
Booted on x86_64.

Jirka

diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index e54fa46..0606560 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -657,14 +657,14 @@ out:
 
 static __inline__ void fib6_start_gc(struct rt6_info *rt)
 {
-	if (ip6_fib_timer.expires == 0 &&
+	if (!timer_pending(&ip6_fib_timer) &&
 	    (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE)))
 		mod_timer(&ip6_fib_timer, jiffies + ip6_rt_gc_interval);
 }
 
 void fib6_force_start_gc(void)
 {
-	if (ip6_fib_timer.expires == 0)
+	if (!timer_pending(&ip6_fib_timer))
 		mod_timer(&ip6_fib_timer, jiffies + ip6_rt_gc_interval);
 }