Skip to content

Commit

Permalink
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6…
Browse files Browse the repository at this point in the history
…-x86

* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86:
  x86: fix global_flush_tlb() bug
  • Loading branch information
Linus Torvalds committed Oct 19, 2007
2 parents f768f9d + 9a24d04 commit 2679065
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions arch/x86/mm/pageattr_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,14 @@ void global_flush_tlb(void)
struct page *pg, *next;
struct list_head l;

down_read(&init_mm.mmap_sem);
/*
* Write-protect the semaphore, to exclude two contexts
* doing a list_replace_init() call in parallel and to
* exclude new additions to the deferred_pages list:
*/
down_write(&init_mm.mmap_sem);
list_replace_init(&deferred_pages, &l);
up_read(&init_mm.mmap_sem);
up_write(&init_mm.mmap_sem);

flush_map(&l);

Expand Down

0 comments on commit 2679065

Please sign in to comment.