Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d9b7a5c authored by Bernd Schmidt's avatar Bernd Schmidt Committed by Bryan Wu
Browse files

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: default avatarBernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 225f7e1e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -173,9 +173,11 @@ static inline void protect_page(struct mm_struct *mm, unsigned long addr,

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

#endif