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]
Date:	Fri, 14 Dec 2007 18:31:48 +0800
From:	Miao Xie <miaox@...fujitsu.com>
To:	tglx@...utronix.de
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH] time: add an offline-cpu check in add_timer_on()

Hi everyone,
   I think we need a check in the function add_timer_on() to avoid adding a
timer into the timer list of an offline cpu.

This patch fixes this problem in add_timer_on().

Signed-off-by: Miao Xie <miaox@...fujitsu.com>

---
  kernel/timer.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index a05817c..6189561 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -451,6 +451,7 @@ void add_timer_on(struct timer_list *timer, int cpu)
  	timer_stats_timer_set_start_info(timer);
  	BUG_ON(timer_pending(timer) || !timer->function);
  	spin_lock_irqsave(&base->lock, flags);
+	BUG_ON(cpu_is_offline(cpu));
  	timer_set_base(timer, base);
  	internal_add_timer(base, timer);
  	spin_unlock_irqrestore(&base->lock, flags);
-- 
1.5.3.7


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ