Skip to content

Commit

Permalink
ia64 idle: delete stale (*idle)() function pointer
Browse files Browse the repository at this point in the history
Commit 3e7fc70 ("ia64 idle: delete pm_idle") in 3.9-rc1 didn't
finish the job, leaving an un-initialized reference to (*idle)().

[ Haven't seen a crash from this - but seems like we are just being
  lucky that "idle" is zero so it does get initialized before we jump to
  randomland  - Len ]

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
lenb authored and torvalds committed Mar 29, 2013
1 parent 67e17c1 commit ed17688
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,14 @@ cpu_idle (void)
}

if (!need_resched()) {
void (*idle)(void);
#ifdef CONFIG_SMP
min_xtp();
#endif
rmb();
if (mark_idle)
(*mark_idle)(1);

if (!idle)
idle = default_idle;
(*idle)();
default_idle();
if (mark_idle)
(*mark_idle)(0);
#ifdef CONFIG_SMP
Expand Down

0 comments on commit ed17688

Please sign in to comment.