patch-2.3.99-pre4 linux/arch/arm/mm/mm-armv.c

Next file: linux/arch/arm/mm/mm-sa1100.c
Previous file: linux/arch/arm/mm/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/arch/arm/mm/mm-armv.c linux/arch/arm/mm/mm-armv.c
@@ -293,9 +293,14 @@
  */
 void setup_mm_for_reboot(char mode)
 {
-	pgd_t *pgd = current->mm->pgd;
+	pgd_t *pgd;
 	pmd_t pmd;
 	int i;
+
+	if (current->mm && current->mm->pgd)
+		pgd = current->mm->pgd;
+	else
+		pgd = init_mm.pgd;
 
 	for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++) {
 		pmd_val(pmd) = (i << PGDIR_SHIFT) |

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)