Hugh Dickins 705e87c0c3 [PATCH] mm: pte_offset_map_lock loops
Convert those common loops using page_table_lock on the outside and
pte_offset_map within to use just pte_offset_map_lock within instead.

These all hold mmap_sem (some exclusively, some not), so at no level can a
page table be whipped away from beneath them.  But whereas pte_alloc loops
tested with the "atomic" pmd_present, these loops are testing with pmd_none,
which on i386 PAE tests both lower and upper halves.

That's now unsafe, so add a cast into pmd_none to test only the vital lower
half: we lose a little sensitivity to a corrupt middle directory, but not
enough to worry about.  It appears that i386 and UML were the only
architectures vulnerable in this way, and pgd and pud no problem.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:40 -07:00
..
2005-08-25 12:40:44 -04:00
2005-09-05 00:06:11 -07:00
2005-09-07 16:57:21 -07:00
2005-09-05 00:06:11 -07:00
2005-09-07 16:57:21 -07:00
2005-08-24 12:08:54 -04:00
2005-09-30 12:41:17 -07:00
2005-08-24 12:08:54 -04:00
2005-09-08 01:45:47 -04:00
2005-09-05 00:06:12 -07:00
2005-08-14 18:21:30 -07:00
2005-09-05 00:06:12 -07:00
2005-10-29 21:40:35 -07:00
2005-09-10 10:06:21 -07:00
2005-09-05 00:06:12 -07:00
2005-09-05 00:06:18 -07:00
2005-09-05 00:05:48 -07:00
2005-09-05 00:06:11 -07:00