Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26790656 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents f768f9d3 9a24d04a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);