diff options
author | Bernd Schmidt <bernds_cb1@t-online.de> | 2008-08-25 06:41:15 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-08-25 06:41:15 -0400 |
commit | 3d9b7a5ce534f3963afcf8f4777267e5899fe007 (patch) | |
tree | 8b12d350b00a0c0f12d4764fe5998ef0a9bfed57 | |
parent | 225f7e1eb56ad054c328ae1b11601ea4de7488ba (diff) |
Blackfin arch: fix bug - MPU crashes under stress
Bug Description:
a customer reported under IRQ stress, running applications may
wrongly trigger an ICPLB miss and be killed. after playing a
bit more, here's a test case that may be triggering the same bug.
Fixing:
After modifying page protections, only modify the active CPLBs if the
protection change was made for the active mm.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r-- | include/asm-blackfin/mmu_context.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h index f55ec3c23a92..8529552a981f 100644 --- a/include/asm-blackfin/mmu_context.h +++ b/include/asm-blackfin/mmu_context.h | |||
@@ -173,8 +173,10 @@ static inline void protect_page(struct mm_struct *mm, unsigned long addr, | |||
173 | 173 | ||
174 | static inline void update_protections(struct mm_struct *mm) | 174 | static inline void update_protections(struct mm_struct *mm) |
175 | { | 175 | { |
176 | flush_switched_cplbs(); | 176 | if (mm->context.page_rwx_mask == current_rwx_mask) { |
177 | set_mask_dcplbs(mm->context.page_rwx_mask); | 177 | flush_switched_cplbs(); |
178 | set_mask_dcplbs(mm->context.page_rwx_mask); | ||
179 | } | ||
178 | } | 180 | } |
179 | #endif | 181 | #endif |
180 | 182 | ||