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  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:	Mon, 23 Mar 2009 14:11:49 +0900
From:	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	linux-kernel@...r.kernel.org, stable@...nel.org,
	Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH 1/2] x86: Rename __task_delta_exec() to task_delta_exec_locked()

Externing function with prefix "__" is unpleasant.
This patch renames the function and fix the caller.
This change is desirable for other fix that against posix clocks,
since the fix introduces another __task_delta_exec() which is static.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
---
 include/linux/kernel_stat.h |    2 +-
 kernel/perf_counter.c       |    6 +++---
 kernel/sched.c              |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index b6d2887..459bc1e 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -87,7 +87,7 @@ static inline unsigned int kstat_irqs(unsigned int irq)
  */
 extern void curr_rq_lock_irq_save(unsigned long *flags);
 extern void curr_rq_unlock_irq_restore(unsigned long *flags);
-extern unsigned long long __task_delta_exec(struct task_struct *tsk, int update);
+extern unsigned long long task_delta_exec_locked(struct task_struct *tsk, int update);
 extern unsigned long long task_delta_exec(struct task_struct *);
 
 extern void account_user_time(struct task_struct *, cputime_t, cputime_t);
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index f054b8c..66ddb2f 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -881,7 +881,7 @@ int perf_counter_task_disable(void)
 	cpu = smp_processor_id();
 
 	/* force the update of the task clock: */
-	__task_delta_exec(curr, 1);
+	task_delta_exec_locked(curr, 1);
 
 	perf_counter_task_sched_out(curr, cpu);
 
@@ -922,7 +922,7 @@ int perf_counter_task_enable(void)
 	cpu = smp_processor_id();
 
 	/* force the update of the task clock: */
-	__task_delta_exec(curr, 1);
+	task_delta_exec_locked(curr, 1);
 
 	perf_counter_task_sched_out(curr, cpu);
 
@@ -1635,7 +1635,7 @@ static u64 task_clock_perf_counter_val(struct perf_counter *counter, int update)
 	struct task_struct *curr = counter->task;
 	u64 delta;
 
-	delta = __task_delta_exec(curr, update);
+	delta = task_delta_exec_locked(curr, update);
 
 	return curr->se.sum_exec_runtime + delta;
 }
diff --git a/kernel/sched.c b/kernel/sched.c
index 3e827b8..5ee5a06 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4304,10 +4304,10 @@ DEFINE_PER_CPU(struct kernel_stat, kstat);
 EXPORT_PER_CPU_SYMBOL(kstat);
 
 /*
- * Return any ns on the sched_clock that have not yet been banked in
- * @p in case that task is currently running.
+ * Return any ns on the sched_clock that have not yet been accounted.
+ * @p must be a task currently running.
  */
-unsigned long long __task_delta_exec(struct task_struct *p, int update)
+unsigned long long task_delta_exec_locked(struct task_struct *p, int update)
 {
 	s64 delta_exec;
 	struct rq *rq;
-- 
1.6.2.1


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