Subject: Re: kernel crash with munmap

From: Philip Blundell <[email-masked]>
Date: Sun, 27 Aug 2000 22:01:50 +0100

The bug below still seems to be present in 2.4.0-test6.  
Is anybody else able to reproduce the problem?

p.

>When I run the program below on my CATS under 2.4.0-test2, the machine locks 
>up.  It seems to be OK on my i386 with 2.4.0-test5.  Any ideas what might be 
>wrong?
>
>p.
>
>--
>
>#include <fcntl.h>
>#include <sys/mman.h>
>#include <sys/stat.h>
>
>#define NULL 0
>
>int main(int argc, char *argv)
>{
>  char *s = tmpnam(NULL);
>  int fd = open(s, O_CREAT | O_RDWR);
>  int fd2 = open("/bin/ls", O_RDONLY);
>  ftruncate(fd, 640*1024);
>  unlink(s);
>  mmap(0x8000, 640*1024, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP
>_FIXED, fd, 0);
>  read(fd2, 0x8000, 640*1024);
>  munmap(0x8000, 640*1024);
>  exit(0);
>}
>
>

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]