Purge existing TLB entries in set_pte_at and ptep_set_wrprotect
authorJohn David Anglin <dave.anglin@bell.net>
Tue, 15 Jan 2013 00:45:00 +0000 (19:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 14:32:27 +0000 (06:32 -0800)
commitef96576ef50b8bbd4c63b9cebab372cb7cf4ba67
treebf2a6d1637c5b3d84b4fcd71d0970f18ada28aac
parent534aaed9080ba82974e8d2a71e43a362918138f8
Purge existing TLB entries in set_pte_at and ptep_set_wrprotect

commit 7139bc1579901b53db7e898789e916ee2fb52d78 upstream.

This patch goes a long way toward fixing the minifail bug, and
it  significantly improves the stability of SMP machines such as
the rp3440.  When write  protecting a page for COW, we need to
purge the existing translation.  Otherwise, the COW break
doesn't occur as expected because the TLB may still have a stale entry
which allows writes.

[jejb: fix up checkpatch errors]
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/pgtable.h
arch/parisc/kernel/cache.c