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:	Wed,  2 Mar 2016 12:53:32 +0100
From:	Alexander Gordeev <agordeev@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Alexander Gordeev <agordeev@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH v3 2/2] sched/core: Get rid of 'cpu' local variable in __schedule()

This update is a continuation of commit 3223d05 ("sched/core:
Remove dead statement in __schedule()") and completes the
removal of a dead code with a removal of an unnecessary 'cpu'
local variable - as it is only used to acquire the current
runqueue.

Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Alexander Gordeev <agordeev@...hat.com>
---
 kernel/sched/core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 735e87c..75e62ef 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3131,10 +3131,8 @@ static void __sched notrace __schedule(bool preempt)
 	struct task_struct *prev, *next;
 	unsigned long *switch_count;
 	struct rq *rq;
-	int cpu;
 
-	cpu = smp_processor_id();
-	rq = cpu_rq(cpu);
+	rq = this_rq();
 	prev = rq->curr;
 
 	/*
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ