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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Jul 2015 10:14:12 -0700
From:	tip-bot for Thomas Gleixner <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...nel.org, hpa@...or.com, preeti@...ux.vnet.ibm.com,
	tglx@...utronix.de, Catalin.Marinas@....com, peterz@...radead.org,
	linux-kernel@...r.kernel.org, Lorenzo.Pieralisi@....com,
	rafael.j.wysocki@...el.com, Suzuki.Poulose@....com,
	sudeep.holla@....com
Subject: [tip:timers/urgent] tick/broadcast:
  Return busy if periodic mode and hrtimer broadcast

Commit-ID:  d33257264b0267a8fd20f6717abbb484c9e21130
Gitweb:     http://git.kernel.org/tip/d33257264b0267a8fd20f6717abbb484c9e21130
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Tue, 7 Jul 2015 17:45:22 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 7 Jul 2015 18:46:48 +0200

tick/broadcast: Return busy if periodic mode and hrtimer broadcast

If the system is in periodic mode and the broadcast device is hrtimer
based, return busy as we have no proper handling for this.

[ Split out from a larger combo patch ]

Tested-by: Sudeep Holla <sudeep.holla@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Suzuki Poulose <Suzuki.Poulose@....com>
Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>
Cc: Catalin Marinas <Catalin.Marinas@....com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...nel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1507070929360.3916@nanos
---
 kernel/time/tick-broadcast.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 83aa92e..da7b40f 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -709,8 +709,12 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
 		 * If the broadcast device is in periodic mode, we
 		 * return.
 		 */
-		if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
+		if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) {
+			/* If it is a hrtimer based broadcast, return busy */
+			if (bc->features & CLOCK_EVT_FEAT_HRTIMER)
+				ret = -EBUSY;
 			goto out;
+		}
 
 		if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {
 			WARN_ON_ONCE(cpumask_test_cpu(cpu, tick_broadcast_pending_mask));
--
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