aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:57:05 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:57:05 -0400
commit26790656d7dc34206f78eeca0f4be5caede788ce (patch)
tree3c14682145c1a68223e2bc0d8fb35c145943756d /arch
parentf768f9d3757be475a20cb5f9d63bda45934150b1 (diff)
parent9a24d04a3c26c223f22493492c5c9085b8773d4a (diff)
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: x86: fix global_flush_tlb() bug
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/pageattr_64.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c
index 8a4f65bf956e..c7b7dfe1d405 100644
--- a/arch/x86/mm/pageattr_64.c
+++ b/arch/x86/mm/pageattr_64.c
@@ -230,9 +230,14 @@ void global_flush_tlb(void)
230 struct page *pg, *next; 230 struct page *pg, *next;
231 struct list_head l; 231 struct list_head l;
232 232
233 down_read(&init_mm.mmap_sem); 233 /*
234 * Write-protect the semaphore, to exclude two contexts
235 * doing a list_replace_init() call in parallel and to
236 * exclude new additions to the deferred_pages list:
237 */
238 down_write(&init_mm.mmap_sem);
234 list_replace_init(&deferred_pages, &l); 239 list_replace_init(&deferred_pages, &l);
235 up_read(&init_mm.mmap_sem); 240 up_write(&init_mm.mmap_sem);
236 241
237 flush_map(&l); 242 flush_map(&l);
238 243