lkml.org 
[lkml]   [2002]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Missing memory barrier in pte_chain_unlock

Hi,

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.

Anton

===== include/linux/page-flags.h 1.12 vs edited =====
--- 1.12/include/linux/page-flags.h Wed Jul 17 07:46:30 2002
+++ edited/include/linux/page-flags.h Thu Jul 25 19:24:52 2002
@@ -249,6 +248,7 @@

static inline void pte_chain_unlock(struct page *page)
{
+ smp_mb__before_clear_bit();
clear_bit(PG_chainlock, &page->flags);
preempt_enable();
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.264 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site