summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2008-03-26 09:17:43 +0800
committerBryan Wu <cooloney@kernel.org>2008-03-26 09:17:43 +0800
commit904656cda10ce985e6bc8b16488b58236eaec8e2 (patch)
treef995993f5dddd985da0dec9207feef984fca3725
parent9a62ca40fd793742f92565104c6b44319af8c282 (diff)
downloadop-kernel-dev-904656cda10ce985e6bc8b16488b58236eaec8e2.zip
op-kernel-dev-904656cda10ce985e6bc8b16488b58236eaec8e2.tar.gz
[Blackfin] arch: fix bug - grab locks when not atomic
grab locks when not atomic - this fixes the issues sometimes seen when using magic sysrq. Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r--arch/blackfin/kernel/traps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 7557d0d..de249d6 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -75,7 +75,7 @@ static void decode_address(char *buf, unsigned long address)
struct task_struct *p;
struct mm_struct *mm;
unsigned long flags, offset;
- unsigned int in_exception = bfin_read_IPEND() & 0x10;
+ unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic();
#ifdef CONFIG_KALLSYMS
unsigned long symsize;
@@ -117,7 +117,7 @@ static void decode_address(char *buf, unsigned long address)
*/
write_lock_irqsave(&tasklist_lock, flags);
for_each_process(p) {
- mm = (in_exception ? p->mm : get_task_mm(p));
+ mm = (in_atomic ? p->mm : get_task_mm(p));
if (!mm)
continue;
@@ -146,14 +146,14 @@ static void decode_address(char *buf, unsigned long address)
sprintf(buf, "<0x%p> [ %s + 0x%lx ]",
(void *)address, name, offset);
- if (!in_exception)
+ if (!in_atomic)
mmput(mm);
goto done;
}
vml = vml->next;
}
- if (!in_exception)
+ if (!in_atomic)
mmput(mm);
}
OpenPOWER on IntegriCloud