Commit f4f65023 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] Missing memory barrier in pte_chain_unlock

On a ppc64 machine running 2.5.28 we were hitting this BUG in
__free_pages_ok:

BUG_ON(page->pte.chain != NULL);

In pte_chain_lock we use test_and_set_bit which implies a memory
barrier. In pte_chain_unlock we use clear_bit which has no memory
barriers so we need to add one.
parent 866b413d
......@@ -249,6 +249,7 @@ static inline void pte_chain_lock(struct page *page)
static inline void pte_chain_unlock(struct page *page)
{
smp_mb__before_clear_bit();
clear_bit(PG_chainlock, &page->flags);
preempt_enable();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment