lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070705111246.GB1569@ff.dom.local>
Date:	Thu, 5 Jul 2007 13:12:46 +0200
From:	Jarek Poplawski <jarkao2@...pl>
To:	netdev@...r.kernel.org
Cc:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
	"David S\. Miller" <davem@...emloft.net>,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: [PATCH 1/2][IPV6] addrconf: fix timer deleting on exit


It looks like a timer function can be running and rearm
the timer after removing a ipv6 module.


Signed-off-by: Jarek Poplawski <jarkao2@...pl>

---

diff -Nurp 2.6.22-rc7-/net/ipv6/addrconf.c 2.6.22-rc7/net/ipv6/addrconf.c
--- 2.6.22-rc7-/net/ipv6/addrconf.c	2007-07-02 09:03:29.000000000 +0200
+++ 2.6.22-rc7/net/ipv6/addrconf.c	2007-07-05 12:27:22.000000000 +0200
@@ -2957,8 +2957,11 @@ restart:
 		read_unlock(&addrconf_hash_lock);
 	}
 
-	addr_chk_timer.expires = time_before(next, jiffies + HZ) ? jiffies + HZ : next;
-	add_timer(&addr_chk_timer);
+	if (ipv6_dev_notf.notifier_call) {	/* exit time? */
+		addr_chk_timer.expires = time_before(next, jiffies + HZ)
+							? jiffies + HZ : next;
+		add_timer(&addr_chk_timer);
+	}
 	spin_unlock_bh(&addrconf_verify_lock);
 }
 
@@ -4281,9 +4284,13 @@ void __exit addrconf_cleanup(void)
 			 */
 		}
 	}
+
+	/* now exit flag for a timer... */
+	ipv6_dev_notf.notifier_call = NULL;
 	write_unlock_bh(&addrconf_hash_lock);
 
-	del_timer(&addr_chk_timer);
+	if (!del_timer_sync(&addr_chk_timer))
+		del_timer_sync(&addr_chk_timer);
 
 	rtnl_unlock();
 
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ