diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2004-04-14 17:04:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-14 17:04:10 -0700 |
| commit | cc8a7ced219e199fc522a82acff2582701b2c304 (patch) | |
| tree | 2d86e572120bc0fb1c084e5b15bf861b23f02310 /include/linux/ppdev.h | |
| parent | 95c49c775434596184dd0f1a6dbd1e048055b500 (diff) | |
[PATCH] ppc64: Fix possible duplicate MMU hash entries
The current code has a subtle race where 2 hash PTEs can be inserted
for the same virtual address for a short period of time. There should
not be a stale one as the "old" one ultimately gets flushed, but the
architecture specifies that having two hash PTE is illegal and can
result in undefined behaviour.
This patch fixes it by never clearing the _PAGE_HASHPTE bit when
doing test_and_clear_{young,dirty}. That means that subsequent faults
on those pages will have a bit more overhead to "discover" that the
hash entry was indeed evicted.
It also adds a small optisation to avoid doing the atomic operation
and the hash flush in test_and_clear_dirty when the page isn't dirty
or when setting write protect while it's already set.
Diffstat (limited to 'include/linux/ppdev.h')
0 files changed, 0 insertions, 0 deletions
