| Update of /cvsroot/linuxsh/linux/arch/sh/mm
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15373/arch/sh/mm
Modified Files:
	fault.c 
Log Message:
Shut up gcc4, fix a case in __do_page_fault() where the mm context can be
uninitialized.
Index: fault.c
===================================================================
RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/fault.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- fault.c	27 Mar 2006 21:06:14 -0000	1.21
+++ fault.c	7 Aug 2006 06:50:26 -0000	1.22
@@ -189,15 +189,16 @@
 /*
  * Called with interrupts disabled.
  */
-asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-			       unsigned long address)
+asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
+					 unsigned long writeaccess,
+					 unsigned long address)
 {
 	pgd_t *pgd;
 	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 	pte_t entry;
-	struct mm_struct *mm;
+	struct mm_struct *mm = current->mm;
 	spinlock_t *ptl;
 	int ret = 1;
 
@@ -215,10 +216,10 @@
 		pgd = pgd_offset_k(address);
 		mm = NULL;
 	} else {
-		if (unlikely(address >= TASK_SIZE || !(mm = current->mm)))
+		if (unlikely(address >= TASK_SIZE || !mm))
 			return 1;
 
-		pgd = pgd_offset(current->mm, address);
+		pgd = pgd_offset(mm, address);
 	}
 
 	pud = pud_offset(pgd, address);
 |