forked from rubenslte/android_kernel_samsung_msm8226
Revert "msm: move printk out of spin lock low_water_lock"
This reverts commit 749c4210f338496abf2e16ef51308ff756b34f7b. This patch is a hack intended to solve a particular instance of a more generic problem. The cause of the spindump timeout has been fixed with the commit f37a3dc536e4ecd72961a2d9c77f5587c5c55d8f. Furthermore this change also introduces a race condition since the printk is actually intended to be protected with the spinlock. Change-Id: I8ca057f47760c7bb5b826cceeac92ae5e124e904 Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
This commit is contained in:
+2
-7
@@ -880,7 +880,6 @@ 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);
|
||||
|
||||
@@ -889,16 +888,12 @@ static void check_stack_usage(void)
|
||||
|
||||
spin_lock(&low_water_lock);
|
||||
if (free < lowest_to_date) {
|
||||
lowest_to_date = free;
|
||||
islower = true;
|
||||
}
|
||||
spin_unlock(&low_water_lock);
|
||||
|
||||
if (islower) {
|
||||
printk(KERN_WARNING "%s used greatest stack depth: %lu bytes "
|
||||
"left\n",
|
||||
current->comm, free);
|
||||
lowest_to_date = free;
|
||||
}
|
||||
spin_unlock(&low_water_lock);
|
||||
}
|
||||
#else
|
||||
static inline void check_stack_usage(void) {}
|
||||
|
||||
Reference in New Issue
Block a user