diff options
| author | Tingting Yang <tingting@codeaurora.org> | 2013-08-06 11:12:52 +0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:19:01 -0700 |
| commit | 77f8a7593398d7a3fc105ad80873d555f8894dec (patch) | |
| tree | e2644763cd1e26c168a474ae041c3c9cbde3b91d /kernel/exit.c | |
| parent | 47dd56f65eaf62b38941a4b3e835846bd7fb293c (diff) | |
msm: move printk out of spin lock low_water_lock
cpu3 stuck in printk more time in spin lock low_water_lock cause cpu0
get spin lock fail and system crashed.
CRs-Fixed: 521570
Change-Id: I75356a4b4171ae2888ce6cce792f569b5ca8cdcf
Signed-off-by: Tingting Yang <tingting@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 18948169f997..77d54139672b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -632,6 +632,7 @@ static void check_stack_usage(void) static DEFINE_SPINLOCK(low_water_lock); static int lowest_to_date = THREAD_SIZE; unsigned long free; + int islower = false; free = stack_not_used(current); @@ -640,11 +641,16 @@ static void check_stack_usage(void) spin_lock(&low_water_lock); if (free < lowest_to_date) { - pr_warn("%s (%d) used greatest stack depth: %lu bytes left\n", - current->comm, task_pid_nr(current), free); lowest_to_date = free; + islower = true; } spin_unlock(&low_water_lock); + + if (islower) { + printk(KERN_WARNING "%s (%d) used greatest stack depth: " + "%lu bytes left\n", + current->comm, task_pid_nr(current), free); + } } #else static inline void check_stack_usage(void) {} |
