[PATCH] jump_label: fix stack overflow

From: Andrew Jones
Date: Fri May 05 2017 - 13:54:35 EST


Fix a typo that leads to static_key_disable_cpuslocked infinitely
recursing. This was found when the PMU kvm-unit-tests test for ARM
crashed the host and bisection lead to 924726b2b5e5 "perf: Cure
hotplug lock ordering issues". That commit was just the victim,
the culprit commit is identified below in 'Fixes'.

Fixes: fc932a0477d0 "jump_label: Provide static_key_[disable|/slow_dec]_cpuslocked()"
Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
include/linux/jump_label.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 6e3ebf2a39ede..bedd55849c2e3 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -259,7 +259,7 @@ static inline void static_key_disable(struct static_key *key)

static inline void static_key_disable_cpuslocked(struct static_key *key)
{
- static_key_disable_cpuslocked(key);
+ static_key_disable(key);
}

#define STATIC_KEY_INIT_TRUE { .enabled = ATOMIC_INIT(1) }
--
2.7.4