Skip to content

Commit

Permalink
Blackfin arch: fix bug - MPU crashes under stress
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bernd Schmidt authored and Bryan Wu committed Aug 25, 2008
1 parent 225f7e1 commit 3d9b7a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/asm-blackfin/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ static inline void protect_page(struct mm_struct *mm, unsigned long addr,

static inline void update_protections(struct mm_struct *mm)
{
flush_switched_cplbs();
set_mask_dcplbs(mm->context.page_rwx_mask);
if (mm->context.page_rwx_mask == current_rwx_mask) {
flush_switched_cplbs();
set_mask_dcplbs(mm->context.page_rwx_mask);
}
}
#endif

Expand Down

0 comments on commit 3d9b7a5

Please sign in to comment.