[xtensa-cvscommit] linux/arch/xtensa/mm fault.c,1.7,1.8
Brought to you by:
zankel
|
From: <joe...@us...> - 2003-07-30 21:26:49
|
Update of /cvsroot/xtensa/linux/arch/xtensa/mm
In directory sc8-pr-cvs1:/tmp/cvs-serv2296/arch/xtensa/mm
Modified Files:
fault.c
Log Message:
Patch a missed store-exception condition that should be passed on as a good area.
Index: fault.c
===================================================================
RCS file: /cvsroot/xtensa/linux/arch/xtensa/mm/fault.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fault.c 1 Apr 2003 22:28:34 -0000 1.7
--- fault.c 30 Jul 2003 21:26:46 -0000 1.8
***************
*** 250,257 ****
else xt_staletlb();
-
- /* XTFIXME: Use 3 for now, but is it correct? The
- kernel uses 'write' value passed in
- handle_mm_fault() as a boolean variable only. */
write = 3;
break;
--- 250,253 ----
***************
*** 290,307 ****
info.si_code = SEGV_ACCERR;
! /* XTFIXME: Should the following if-statement handle the
! write==3 case? I couldn't think of one off-hand, and
! perhaps the load case encompases that condition. [jet, 13
! mar 2001] */
!
! if (write == 1) { /* store */
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
! } else if(write == 2) { /* i-fetch */
if (!(vma->vm_flags & VM_EXEC))
goto bad_area;
! } else { /* load */
! if (!(vma->vm_flags & VM_READ))
goto bad_area;
}
--- 286,307 ----
info.si_code = SEGV_ACCERR;
! switch (write) {
! case 0: /* load */
! if (!(vma->vm_flags & VM_READ))
! goto bad_area;
! break;
! case 1: /* store */
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
! break;
! case 2: /* i-fetch */
if (!(vma->vm_flags & VM_EXEC))
goto bad_area;
! break;
! case 3: /* load or store */
! default:
! if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
goto bad_area;
+ break;
}
|