posix_cpu_timer: check return on cpu_timer_sample_group
If error, don't trust "now" time that it should be setting kernel/time/posix-cpu-timers.c:1269:13: warning: 'now' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: I679d99c335494bae50fd926663fad37aedb1487a Signed-off-by: Chris Fries <cfries@google.com>
This commit is contained in:
parent
815e2d8190
commit
fa65c420dd
1 changed files with 2 additions and 1 deletions
|
@ -1253,7 +1253,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
|
|||
unsigned long long now = 0;
|
||||
|
||||
WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
|
||||
cpu_timer_sample_group(clock_idx, tsk, &now);
|
||||
if (cpu_timer_sample_group(clock_idx, tsk, &now))
|
||||
return;
|
||||
|
||||
if (oldval) {
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue