Is this the same bit of logic in 2.4.7:

good_area:
        write = 0;
        si_code = SEGV_ACCERR;

        switch (error_code & 0xFF) {
                case 0x04:                                /* write,
present*/
                        write = 1;
                        break;
                case 0x10:                                   /* not
present*/
                case 0x11:                                   /* not
present*/
                        if (!(vma->vm_flags & (VM_READ | VM_EXEC |
VM_WRITE)))
                                goto bad_area;
---->>>> Insert patch here?
                        break;
                default:
                       printk("code should be 4, 10 or 11 (%lX)
\n",error_code&0xFF);
                       goto bad_area;
        }


> -----Original Message-----
> Hi Jason,
> > I've tried the attached simple program on RedHat 2.4.9-17 and
> > the lastest 2.4.17 build from IBM, and both fail miserably:
>
> This is a bug in arch/{s390,s390x}/mm/fault.c that is present
> since the
> beginning. A small wonder that nobody noticed it until now...
> The following patch should take care of it:
>
> diff -urN linux-2.4.17/arch/s390/mm/fault.c
> linux-2.4.17-s390/arch/s390/mm/fault.c
> --- linux-2.4.17/arch/s390/mm/fault.c     Wed May 22 20:18:55 2002
> +++ linux-2.4.17-s390/arch/s390/mm/fault.c      Wed May 22
> 20:14:10 2002
> @@ -222,6 +222,9 @@
>             /* page not present, check vm flags */
>             if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
>                   goto bad_area;
> +     } else {
> +           if (!(vma->vm_flags & VM_WRITE))
> +                 goto bad_area;
>       }

Reply via email to