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>] [day] [month] [year] [list]
Date:	Fri, 17 Oct 2008 18:21:29 -0700
From:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
To:	Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Subject: [PATCH -rt] sched: remove unneeded #if directive

From: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>

__cond_resched_spinlock() is in #ifdef CONFIG_PREEMPT_RT.
So the following line always true.
#if (defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)) || defined(CONFIG_PREEMPT_RT)

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
---
 kernel/sched.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 0d68e79..2b34f00 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5841,7 +5841,6 @@ EXPORT_SYMBOL(__cond_resched_raw_spinlock);
 
 int __cond_resched_spinlock(spinlock_t *lock)
 {
-#if (defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)) || defined(CONFIG_PREEMPT_RT)
 	if (lock->break_lock) {
 		lock->break_lock = 0;
 		spin_unlock_no_resched(lock);
@@ -5849,7 +5848,7 @@ int __cond_resched_spinlock(spinlock_t *lock)
 		spin_lock(lock);
 		return 1;
 	}
-#endif
+
 	return 0;
 }
 EXPORT_SYMBOL(__cond_resched_spinlock);
-- 
1.5.6

--
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